Search for at
Security Code:
Security Code 
Type Security Code:
EVO CMS Advanced Search
 
 
Recent Topics
Latest Site News << Previous 5  Next 5 >>
Forum Author Replies Last Post
Idea  UTF-8 und Error 500 -> evo.htaccess Fixes & Patches 2.1.x ReOrGaNiSaTiOn 0 04 Sep 2008
ReOrGaNiSaTiOn View latest post
under work  Kostenlos ud Download News & Informationen andre2005 2 02 Sep 2008
andre2005 View latest post
Great !  NEVO 2.1.0 - EINWANDFREI News & Informationen nighty 7 31 Aug 2008
nighty View latest post
No icon  Viel Erfolg für die 2.1.0 - good luck for the release 2.1.0 News & Informationen KaiKiste 3 29 Aug 2008
Dj-Y View latest post
Great !  Nutzt heute abend unseren Online Chat ! News & Informationen Spiders 0 28 Aug 2008
Spiders View latest post
Recent Topics << Previous 15  Next 15 >>
Forum Author Replies Last Post
under work  Forenregeln & FAQ nicht editierbar Fehlermeldungen 2.1.0 RC Reptile2k 3 05 Sep 2009
ReOrGaNiSaTiOn View latest post
No icon  Problem Edit Profile Tab Fehlermeldungen 2.1.0 RC Exoid 4 03 Sep 2009
ReOrGaNiSaTiOn View latest post
No icon  Slow loading (page generation) Support German Community majsta 8 03 Sep 2009
ReOrGaNiSaTiOn View latest post
No icon  evo_mail funky? Fehlermeldungen 2.1.0 RC ohaufe 4 01 Sep 2009
ReOrGaNiSaTiOn View latest post
under work  Topic - Icons Fehlermeldungen 2.1.0 RC Dieter 4 01 Sep 2009
Dieter View latest post
solved  Beförderter Admin kommt nicht auf admin.php Fehlermeldungen 2.1.0 RC Entenmann 22 01 Sep 2009
bekaj View latest post
No icon  Wellcome RC4. Fehlermeldungen 2.1.0 RC GANYANCI 1 01 Sep 2009
ReOrGaNiSaTiOn View latest post
No icon  Nickname ist entweder leer oder ungültig Fehlermeldungen 2.1.0 RC O[s]m[a]n 3 31 Aug 2009
ReOrGaNiSaTiOn View latest post
No icon  Hide Hack Mods legolas 3 28 Aug 2009
legolas View latest post
under work  Themen-Icon auf der startseite nicht sichtbar Fehlermeldungen 2.1.0 RC drigon 12 27 Aug 2009
Reptile2k View latest post
Question  Install/ Update bei anderem Datenbank-Präfix Fragen und Antworten / Questions and Answers SymS 2 25 Aug 2009
Thorm View latest post
under work  Installation auf Strato - kein Admin-Login Fragen & Hilfe vor der Installation 2.1.x SymS 7 24 Aug 2009
SymS View latest post
Idea  Arcade Flash Games gesucht Allgemeines Melli 1 24 Aug 2009
chiroptera View latest post
under work  Kosmetikfehler in der install.php Fehlermeldungen 2.1.0 RC TODIMO 4 22 Aug 2009
RTC4EVER View latest post
Complicity  Rekord? 31,7 Grad im Wohnzimmer! ChitChat Spiders 5 20 Aug 2009
chiroptera View latest post
 

 
Question regarding some custom ATO settings
 
 
Post new topic Reply to topic printer-friendly view
View previous topic :: View next topic  
Author Message
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 11 Dec 2009
Reply with quote
Post subject: Oooh ! Question regarding some custom ATO settings

I am trying to implament a choice of footers through the ATO panel, I have not really had an issue with prior versions including rev 761 but I now cannot seem to make it happen with the most recent changes to the code.

Code:
// GIVE A CHOICE OF FOOTERS
$choice == $ThemeInfo['footer'];
if ($choice == "yes")
{
  $footer = "1";
  }
if ($choice == "no")
  {
  $footer = "0";
}

if ($footer == "1")
{
    include_once(NUKE_THEMES_DIR.$theme_name."/images/ft/footer.php");
}
if ($footer == "0")
{
   include_once(NUKE_THEMES_DIR.$theme_name."/footer.php");
}


this is basically my really crude block of code, maybe someone can show me a better way to implement this?  


 


Last edited by Dave9 on 11 Dec 2009; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
ReOrGaNiSaTiOn
EVO World Team
EVO World Team



Joined: 03-Jan-2006
Posts: 11731
Location: Als Schwabe in Sachsen-Anhalt
Offline
EVO Version: - Developer Edition -
Post Posted:
 11 Dec 2009
Reply with quote
Post subject: No icon Re: New problem regarding some custom ATO settings

Hi,

in the function themefooter() isn't $Themeinfo imported as global (Standard).
Maybe this could cause the problem ??

A shorter way of coding:

$ThemeInfo['footer'] = (exists($ThemeInfo['footer']) && !empty($ThemeInfo['footer') ? $ThemeInfo['footer'] : 'no');
switch ($ThemeInfo['footer']) {
  case 'yes':  include_once(NUKE_THEMES_DIR.$theme_name."/images/ft/footer.php"); break;
  case 'no': include_once(NUKE_THEMES_DIR.$theme_name."/footer.php"); break;
  default:  include_once(NUKE_THEMES_DIR.$theme_name."/footer.php"); break;
}

You may get a E-Warning if $ThemeInfo['footer'] isn't filled in your way. This is why I added the line for filling the variable with a default value.

Greetings
Reo  


 
 
Back to top
View user's profile Send private message Visit poster's website
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 11 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

Quote:
You may get a E-Warning if $ThemeInfo['footer'] isn't filled in your way. This is why I added the line for filling the variable with a default value.


I had not thought about that actually and that is a brilliant call on your behalf... bad bad bad Blockhead  !

Thank you for posting this solution  Grinsen

BH  


 
 
Back to top
View user's profile Send private message Visit poster's website
ReOrGaNiSaTiOn
EVO World Team
EVO World Team



Joined: 03-Jan-2006
Posts: 11731
Location: Als Schwabe in Sachsen-Anhalt
Offline
EVO Version: - Developer Edition -
Post Posted:
 11 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

Did you test it ? I mean, didn't you import $ThemeInfo as global to the function ??  


 
 
Back to top
View user's profile Send private message Visit poster's website
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 11 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

yes in the past I had used $ThemeInfo as a global, in 2.1.0 I do not see it being called as a global through function themefooter(). I have not added it as of yet but have not been able to make it work as of yet either. If I place your code in I get an errorr message: Fatal error: Call to undefined function exists() in C:\wamp\www\210a\themes\IC_Thornz210\theme.php on line 215

if I negate: $ThemeInfo['footer'] = (exists($ThemeInfo['footer']) && !empty($ThemeInfo['footer']) ? $ThemeInfo['footer'] : 'no');

I get a footer and no error messages, but of course cannot make them switch, I was very tired last night and couldn't muster up the energy to keep pushing forward so I will pick at it some more today and see if I can get it to happen.

Thank you for helping with this ReO you absolutely rock my brotha of anotha motha much respect and gratitude for your work  Winken

dave9/BH

GMT-9  Grinsen  


 
 
Back to top
View user's profile Send private message Visit poster's website
ReOrGaNiSaTiOn
EVO World Team
EVO World Team



Joined: 03-Jan-2006
Posts: 11731
Location: Als Schwabe in Sachsen-Anhalt
Offline
EVO Version: - Developer Edition -
Post Posted:
 12 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

sorry ... did a wrong run !!
Replace "exists" with "isset" ....  


 
 
Back to top
View user's profile Send private message Visit poster's website
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 12 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

yes coding GOD they say ...hahahaha tongue

I am able to now make it work just fine, with an un handled exception now taken care of .. thank you  Grinsen

Grinsen  

has been a long but extremely smooth day for me today, this is the icing on the cake!!

thank you so much ReO  


 
 
Back to top
View user's profile Send private message Visit poster's website
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 12 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

Is it possible to call to style.css, to switch from style.css to style2.css or something to that nature?  I cant really see where style is called from exactly..  


 
 
Back to top
View user's profile Send private message Visit poster's website
ReOrGaNiSaTiOn
EVO World Team
EVO World Team



Joined: 03-Jan-2006
Posts: 11731
Location: Als Schwabe in Sachsen-Anhalt
Offline
EVO Version: - Developer Edition -
Post Posted:
 13 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

Hi,

style.css is called from header.php.
A Stylesheet must be linked als linkref inside header informations. So there is the place to look for.

To make a switch which is independet on selection of your themeinfo or something like that, you have to call a new function inside your theme.php. This function call must be placed before the linkref is made to the stylesheet.
Because this all happens inside header-informations, you must make shure, that no informations are send outside allowed http-header informations - otherwise you will get a "header allready sent" error.

Greetings
Reo  


 
 
Back to top
View user's profile Send private message Visit poster's website
Dave9
EVO User
EVO User



Joined: 07-Nov-2009
Posts: 70
Location: The insane assylum~ a quiet peaceful place to change your mind
Offline
EVO Version: evo2.0.7basic/evo2.0.7extreme/evo2.0.7extreme2/evo2.1.0 rev1536
Post Posted:
 13 Dec 2009
Reply with quote
Post subject: No icon Re: Question regarding some custom ATO settings

ah.. okay shaking my head I swear I looked almost everywhere else before asking that question. Thank you again ReO..  Grinsen

I will try not to bug ya with too many stupid questions I promise.. BTW the sig works now thank you for that as well

top


BH  


 
 
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:  
Post new topic Reply to topic printer-friendly view
EVO CMS Forum Index -> Support German Community Time synchronized with the forum server time
 
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum