You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 51 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - $thename = "Default"; - FIXED [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Guest
Guest






PostPosted: Tue Jan 28, 2003 3:57 pm Reply with quoteBack to top

I replaced all of the refs to the Directory name of my theme with the variable $thename and then placed the statement $thename = "Default"; at the top of the theme file. I also put $thename as a global in all the functions that call it.

It doesn't work!!! When I view the source of the rendered page it's src=themes//images/logo.gif instead of src=themes/Default/images/logo.gif. Am I doing something wrong? the bgcolors are working... Do I need to declare $thename somewhere else?
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 4:02 pm Reply with quoteBack to top

exqueeze me?

What is this in relation to?

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Guest
Guest






PostPosted: Tue Jan 28, 2003 4:17 pm Reply with quoteBack to top

Themes.
Find all posts by Anonymous
Guest







PostPosted: Tue Jan 28, 2003 4:21 pm Reply with quoteBack to top

Say the folder name is FOLDER.

$thename = "FOLDER"; is declared at the top of theme.php.

$thename is placed in all the calls to the folder like for images and whatnot. $thename is also a global for all of the functions that call it.

But, the end result is a blank space. The call is for whatever reason never completed. I dont get an error, I just get a broken image.
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 4:24 pm Reply with quoteBack to top

have you tried doing it like:
Code:
 "bla bla bla" .$thename. "/directory off whatever"


ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Tue Jan 28, 2003 4:37 pm Reply with quoteBack to top

You would need to pass that variable within the function calls itself.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Guest







PostPosted: Tue Jan 28, 2003 4:42 pm Reply with quoteBack to top

I'll try that, but why wont it work the way it is? the bgcolor1 and 2 declares work just fine. I don't get it.
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 4:47 pm Reply with quoteBack to top

add it to thte "globals bla bla bla" list at the beginning of each function in the theme

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Guest







PostPosted: Tue Jan 28, 2003 4:49 pm Reply with quoteBack to top

i did that in the beginning... without the global I get a warning at the top of the rendered page. with the global in p,ace, i just get broken images...
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 4:49 pm Reply with quoteBack to top

between each of the globals should be a , and at the end, there should be a ;

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Guest







PostPosted: Tue Jan 28, 2003 4:55 pm Reply with quoteBack to top

Here it is... thinned out of course... THe kicker is that everything works except for the references to $thename.

Code:
<?php

$thename = "FOLDERNAME";
$lnkcolor = "#035D8A";
$bgcolor1 = "#FFFFFF";
$bgcolor2 = "#FFFFFF";
$bgcolor3 = "#FFFFE6";
$bgcolor4 = "#FFFFFF";
$textcolor1 = "FFFFFF";
$textcolor2 = "000000";

$hr = 1; # 1 to have horizonal rule in comments instead of table bgcolor

function themeheader() {
    global $thename, $cookie, $user, $slogan, $sitename, $prefix, $user_prefix, $db, $banners;

echo "<tr><td><a href=\"index.php\"><img src=themes/$thename/images/logo.gif Alt=\"$slogan\" border=0 align=left vspace=0 hspace=0></a>\n";

?>


the above code would render like this...

blah blah... src=themes//images/logo.gif .....blah blah
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 5:00 pm Reply with quoteBack to top

change the echo line to:
Code:
echo "<tr><td><a href=\"index.php\"><img src=\"themes/" .$thename. "/images/logo.gif\" Alt=\"$slogan\" border=0 align=left vspace=0 hspace=0></a>\n";

Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
Guest







PostPosted: Tue Jan 28, 2003 5:08 pm Reply with quoteBack to top

Zhen-Xjell wrote:
You would need to pass that variable within the function calls itself.


Renaming theme/$thename to theme/"$thename"/ resulted in the blank space like before...

I declared $themename in each function and it works great... But wwwwhhhyyyyy is it woprking this way?

I'm lost.. But at least my themes are a little easier to manipulate now..
Find all posts by Anonymous
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Tue Jan 28, 2003 5:11 pm Reply with quoteBack to top

maybe $thename is used elsewhere. Who knows

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Guest







PostPosted: Tue Jan 28, 2003 5:13 pm Reply with quoteBack to top

I already thought of that... On the chance that an error wasn't being returned I renamed $thename to $thename123 and got the same end result... I'll write my thesis on this if I can ever figure it out... Smile
Find all posts by Anonymous
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
You can post new topics in this forum
You can 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.216 Seconds - 167 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::