n0fx |
|
---|---|
Hi everyone, I am still using seditio old version. I converted my database to cotonti siena what was important for me. Then I want to make new theme for my website. I prepared my HTML files. First I was thinking I can use nemesis theme for reference theme but for example there is no forum tpl files in the folder. Then I found tpl files on the modules/forums but I also found tpl files (forum) on the symisun-03 theme folder. So I am confused now How I can start to make new theme ? Someone can guide me? I also need clean and well coded theme for reference. Thanks a lot.
https://www.ultima-strike.com
|
|
This post was edited by n0fx (2016-10-25 00:01, 8 years ago) |
Macik |
|
---|---|
Yes, Nemesis theme is simple enought to start from. But as you mentioned it had not self-tuned tpl for some Extensions. It's OK to use Nemesis as reference and add default TPL from Extensions folders. I do not recommend to use Symisun as its quite outdated. A secong variant is to use more complete (but simple enough) themes like Skeletonti or Clymene. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
Thank you for answer :) I look skeletonti and clymene. I still think nemesis is good start point for reference theme. I want to understand How is working template system because when I add forum tpl files in the root theme folder its working but I also just add forum tpl files in themefolder/modules its working too.. So This template system just can look tpl file name on the theme folder even I added different folder on the theme folder?
I want to ask because I can make own folder structure ? :) https://www.ultima-strike.com
|
Macik |
|
---|---|
To be exact — template loading function is flexible and search for several places TPL file may exists. For example of `coolplug` Plugin and its default template `coolplug.tpl` this chain would be:
(Same rules for Modules and `modules` folder respectively) If you have many Extensions templates in your theme, it's more clear to place it in separate folders. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
Nice :) If there is no problem, I want to ask question about process of new theme on this topic. This topic also can guide who want to make new theme. There is a list about default common, modules and plugin tpl tags? // I found https://www.cotonti.com/tpltags Added 3 days later: Hi, I am using v0.9.19. When I try to use search plugin, there is a error like "You're not allowed to do this.". Then I try to enter "Rights" of Search plugin but there is a also error like "One of the request parameters is invalid or has expired. Please go back and try submitting the form again." Whats the problem? Do you have a idea? I looked issue on the cotonti github page but I couldnt find about it because search plugin doesnt work on this website too. https://www.ultima-strike.com
|
|
This post was edited by n0fx (2016-10-29 01:33, 8 years ago) |
Macik |
|
---|---|
#42239 n0fx: To simplify developing TPL of certain pages — you can eneble list available tags and blocks.
Seems security check of form data is failed (it used by core for POST forms). What way you are use `Search` plugnin? I mean what form, what method of form data sending (get/post) and what address you send this data? Try to see default nemesis theme for search form (in `footer.tpl`). https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
#42264 Macik:#42239 n0fx: I didnt try to send data via POST Actually I just try to enter index.php?e=search and I got error #930 access denied thats why I was trying to enter rights page about search plugin (admin.php?m=rightsbyitem&ic=plug&io=search) then there is a again error "One of the request parameters is invalid or has expired. Please go back and try submitting the form again." I want to say also I upgrade seditio v123 to cotonti v0.9.19 maybe its related about it ? note: I got same error when I use search plugin on the nemesis theme :( https://www.ultima-strike.com
|
Macik |
|
---|---|
So, you get this error even open a plugin page `index.php?e=search`? If so — no idea yet. It can be some rights inconsistency, but needs to be investigated in details. First, try to uninstall it completedly and then reinstall. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
I did reinstall, its working now, thank you :) actually I didnt expect its related reinstall :) Added 5 hours later: Some of plugins are not working with 0.9.19. I made list and I will update this list. I also wrote comment why its not working.
If you want to optimize images expect thumb images. you should add these codes: $info = getimagesize($filename); if ($info['mime'] == 'image/jpeg') {$image = imagecreatefromjpeg($filename); imagejpeg($image, $filename, 85); } elseif ($info['mime'] == 'image/gif') {$image = imagecreatefromgif($filename); imagegif($image, $filename, 85); } elseif ($info['mime'] == 'image/png') {$image = imagecreatefrompng($filename); imagepng($image, $filename, 85); }
Added 1 day later: Hi, I need to use </div> 1 time in the PAGE_ROW. How can i get data how many times loop in the PAGE_ROW like while $i variable ? I hope I could explain myself. I found {PAGE_ROW_NUM} Added 4 days later: how i can change pagination html tags ? https://www.ultima-strike.com
|
|
This post was edited by n0fx (2016-11-05 00:59, 8 years ago) |
Macik |
|
---|---|
#42271 n0fx: What extension / section / template you are edit?
Look at `system/resources.rc.php` → «Pagination» section. You can redefine this variables in your `theme_name.php` file. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
#42293 Macik:#42271 n0fx: I used for news plugin
This is very good but I also need to change <p class="paging"> ? Actually I want to change to <ul> <li> https://www.ultima-strike.com
|
Macik |
|
---|---|
#42302 n0fx: Yes, you can use {PAGE_ROW_NUM}. (Or with direct variable access — {PHP.jj})
Unfortunately, `<p>` wrapper is hard coded in many templates. So to fully change it you need to rearrange whole template. But you can use a little «hackaround» — add wrapper to `$R['link_pagenav_first']` and `$R['link_pagenav_last']` as listed below (… denotes other paging related code): $R['link_pagenav_first'] = '</p><ul class="mypaging">…'; $R['link_pagenav_last'] = '…</ul><p class="paging">'; So final rendered HTML whould be: <p class="paging"></p> <ul class="mypaging"> …you pager code… </ul> <p class="paging"></p> So just add `p.paging{display:none;}` to your CSS to eliminate unnecessary paragraphs. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
#42304 Macik:#42302 n0fx: Its very good I can use also for different variables :)
This is good idea but If you are at the first page system dont show {FORUMS_TOPICS_PAGEPREV} thats why its not working. if ($current > 0) to if ($current > -1) and line 4114 if (($current + $perpage) < $entries) to if ($entries)
Added 5 hours later: {LIST_ROWCAT_COUNT} always show 0 even I looked last element of category structure. It should show how many pages under the category? How i can solve it? Note: I am working with my old database (converted last cotonti version from seditio). When I added page, I can see 1 but it doesnt count my old pages. https://www.ultima-strike.com
|
|
This post was edited by n0fx (2016-11-11 01:46, 8 years ago) |
Macik |
|
---|---|
#42319 n0fx:
First try this: go to «Administration» → «Structure» → «Pages» and click «Resync». https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
n0fx |
|
---|---|
Unfortunately it doesnt work :( NOTE: I was using SED_DEBUG from config.php. When I am seaching why SESSION isnt exists, I changed SED_DEBUG mode to FALSE so its working now. Weird i didnt know its related SED_DEBUG sorry. Added 21 hours later: Hi, I want to use recent items plugin for page.tpl. I researched but I couldn't find a way for it. How i can do it? Many thanks :) https://www.ultima-strike.com
|
|
This post was edited by n0fx (2016-11-13 14:21, 8 years ago) |