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, 68 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 - Left vs. Right Blocks in Theme [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
jjemmett
Nuke Cadet
Nuke Cadet


Joined: Jul 09, 2003
Posts: 1


PostPosted: Thu Jul 10, 2003 11:17 pm Reply with quoteBack to top

This has probably been asked a million times however I can't seem to find an answer. Is there a way to differentiate the look of the left versus the right blocks when creating a theme Question
Find all posts by jjemmettView user's profileSend private message
disgruntledtech
Site Admin
Site Admin


Joined: Apr 14, 2003
Posts: 991

Location: Tulsa, OK

PostPosted: Fri Jul 11, 2003 1:44 am Reply with quoteBack to top

yes there is

Code:
function themefooter() {
    global $index, $rightside;
    if ($index == 1) {
   echo "</td><td>  </td><td valign=\"top\">";
   $rightside = 1;
   blocks(right);
   echo "</td>";
    }
    echo "<br>";
    footmsg();

}


in the footer, we make the variable $rightside global(accessible in other functions)
then set right side to 1 before we call blocks(right)

Code:
function themesidebox($title, $content) {
   global $rightside;
   if ($rightside) {
    //right side code
    echo "$title<br>$content";
   } else {
    //left side code
    echo "$title<br>$content";
   }
}


here we get the value of the global variable $rightside we set in the footer function and we output the rightside block code if it has a value -if not the leftside block code is used
Find all posts by disgruntledtechView user's profileSend private messageSend e-mailVisit poster's website
Cergorach
Nuke Cadet
Nuke Cadet


Joined: Jun 03, 2003
Posts: 7


PostPosted: Sun Jul 20, 2003 9:18 am Reply with quoteBack to top

Ok, this is exactly what i was looking for, but it's not working that great, i now have of every rightsided block three times displayed. Any ideas on why this is? Or does anyone have a link to a theme that already diffirentiates between left and right blocks?

{edit}
Erm... Oops! I have to look harder before i complain, found the problem and corrected it. I placed some of the code in the wrong part of the theme. Doh!
Thanks guys!
{/edit}
Find all posts by CergorachView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



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.437 Seconds - 185 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::