TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-12-2008, 04:35 AM   #1 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default little help figuring out some code.

I have installed Vanilla the forum system on my site. osGuide.net and have been able to edit it pretty easily but i have run into a problem. I am trying to add a line of code only when a subnav is present(which is when a user is logged in) problem is i cant follow the php code enough to figure out where it is. Heres the code that im not able to follow. But through some trial and error i knows its this block that should show it.

PHP Code:
while (list($Key$PanelElement) = each($this->PanelElements)) {
   
$Type $PanelElement['Type'];
   
$Key $PanelElement['Key'];
   if (
$Type == 'List') {
      
$sReturn '';
      
$Links $this->Lists[$Key];
      if (
count($Links) > 0) {
         
ksort($Links);
         
$sReturn .= '<li>';
               while (list(
$LinkKey$Link) = each($Links)) {
                  
$sReturn .= '<a '.($Link['Link'] != '' 'href="'.$Link['Link'].'"' '').' '.$Link['LinkAttributes'].'>'.$Link['Item'];
                        if (
$Link['Suffix'] != ''$sReturn .= ' <span>'.$this->Context->GetDefinition($Link['Suffix']).'</span>';
                     
$sReturn .= '</a>';
                  
$sReturn .= '';
               }
               
$sReturn .= '</li></ul>';
      }
      echo 
$sReturn;
   } elseif (
$Type == 'String') {
      echo 
$this->Strings[$Key];
      
////////echo '</ul></div><div class="navBarSectionBase">&nbsp;</div>';
   
}

the line with the 8 / is the one im having trouble adding thats the closing for my nav. It is currently not in the correct place. Its easy to see the problem in IE6 but harder in ff and opera. Heres 2 screens to see what i mean. Hope this makes sense. and thanks for any help.

links cause they are 1280x800
http://www.osguide.net/images/ie6Screen.gif
http://www.osguide.net/images/oprScreen.gif
CoryMathews is offline  
Reply With Quote
Old 02-12-2008, 01:15 PM   #2 (permalink)
The Contributor
 
Gibou's Avatar
 
Join Date: Nov 2007
Location: France, near Paris
Posts: 53
Thanks: 6
Gibou is on a distinguished road
Default

First, your website is a good idea. Thank you :)

Now:
I don't understand why, to add a navbar, you begin by closing an ul and a div tag.
Then, can you paste here the whole class ? (Just the structure not the method bodies).
Here, I can't do more, I don't see exactly where is this code
__________________
Wedus project's Website
Send a message via MSN to Gibou
Gibou is offline  
Reply With Quote
Old 02-12-2008, 06:39 PM   #3 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

Quote:
Originally Posted by Gibou View Post
First, your website is a good idea. Thank you :)
Thanks.


Never mind i figured it out. Admin can close this.
CoryMathews is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 05:43 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design