Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Tpl - Php Programming Help Wanted 
 
I need to add a php var / string to statistics.tpl to include some markup to allow me to add different footers to Vista Crystal Styles without having to create a new theme-group just for the sake of three entries.

Existing Code:

Code: [Download] [Hide] [Select]
<!-- BEGIN main_bottom -->
<div class="copyright" style="text-align:center;">{VERSION_INFO} &diams; {INSTALL_INFO} &diams; {VIEWED_INFO}</div>
<!-- END main_bottom -->


What I need to do:

Code: [Download] [Hide] [Select]
<!-- BEGIN main_bottom -->
<div class="copyright" style="text-align:center;">{VERSION_INFO} &diams; {INSTALL_INFO} &diams; {VIEWED_INFO}</div>
<!-- END main_bottom -->

#Start Conditions here#
</td>
</tr>
</table>
#End conditions here#


The:

Code: [Download] [Hide] [Select]
</td>
</tr>
</table>


Has to be conditional on the fact that "if exists ../templates/vista/images/coppertone/" for it to be parsed. ?

And also be flexible to add other themes etc?

Else I'll have to make another theme group.

Can this be done? If so - How??  
 
 
 
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
It is easy. Just paste in a spoiler vista.cfg file and I'll show you how.

Greets!
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
Thanks Kas,

The conditions are very important that the path exists, else it will break the tables of other crystal themes.

The themes affected are: army, cool, coppertone, pink and inferno.

Spoiler: [ Show ]

 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
Before ?>, add:
Code: [Download] [Hide] [Select]
if ($color == 'crystal_coppertone')
{
     $template->assign_block_vars('switch_crystal_coppertone', array());
}

If you also want to check for the folder existence you can use this code instead of the written upper:
Code: [Download] [Hide] [Select]
if ($color == 'crystal_coppertone' && file_exists($current_template_images))
{
     $template->assign_block_vars('switch_crystal_coppertone', array());
}


Greets!
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 


Thanks Kas, it looks like it should work - but it didn't

We had about the same problem with pa_*.tpl files not parsing vars from the theme.cfg file until MG modified pafiledb_common.php and added a pa.cfg.tpl file to vista templates.

If we have to go that way again, I'd rather just release them as either a group or all "Stand Alone" themes, because I'm beginning to think that one has to be a "Rocket Scientist Programmer" to apply all of the variations to one .cfg file without having to adjust the core.php files also to get these things to work independant of each other.

Themes really shouldn't be that difficult to make. So I may release all of the themes I have made / modified as stand-alone themes. And fix the problems with markup.
 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
Lopalong wrote: [View Post]
If we have to go that way again, I'd rather just release them as either a group or all "Stand Alone" themes, because I'm beginning to think that one has to be a "Rocket Scientist Programmer" to apply all of the variations to one .cfg file without having to adjust the core.php files also to get these things to work independant of each other.
I think the best way to release templates is in a pack so you don't have to upload big amounts of files each time you want to install a template... If the problem is PHP code, I think I can help you.

It should work on footer:
Code: [Download] [Hide] [Select]
<!-- BEGIN main_bottom -->
<div class="copyright" style="text-align:center;">{VERSION_INFO} &diams; {INSTALL_INFO} &diams; {VIEWED_INFO}</div>
<!-- END main_bottom -->

<!-- BEGIN switch_crystal_coppertone -->
</td>
</tr>
</table>
<!-- END switch_crystal_coppertone -->
In PAFILEDB it should not work because there the template gets parsed in another way through another class...

Just try that code and clean cache.

Greets!
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
Thanks again, Kas.

But I did all that when I was testing it.

I even removed one var: <!-- END switch_crystal_coppertone --> to see if it would generate an error, and it didn't.

The stat's footer also doesn't recognise {IMG_THR} etc, So unless I'm missing something, we're back to square one.

I'll just release them either as a group or stand-alone themes, as either way the problem will not be there anymore.

As to my thoughts on Group vs stand-alone themes, this is something I posted for Luca.

h**p://icythemes.com/ip/re-four-the...g-vp52.html#p52

Anyway, thanks Kas for the input but there were .php problems with pa_*.tpl files too before the core files were modified. And this time, that can be avoided.
 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
Well... pafiledb uses $pafiledb_template instead of $template... I thought you were going to use it in overall_footer...

Anyway thank you for your wonderful templates and good luck
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Tpl - Php Programming Help Wanted 
 
No, it's the stats footer that is / was the problem because I had to close and re-start tables elsewhere with the original Vista styles. And now with the different format for the latest additions, I needed to close off the statistics.tpl strictly with the "if exists" statement.

Doesn't matter now, there are quite a few of the "new" group that will be released here shortly as stand-alone themes - and there is a reason for that also.

Thanks again Kas for your input, but I'm glad now that I didn't go the way of adding them to the original Vista styles.
 
 
 
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron