Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

theme.php side panel

Asked Modified Viewed 2,416 times
E
exe_work
E
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Junior Member

Hello,
my side panel in theme.php code looks like this A
function openside($title, $collapse = false, $state = "on") {

   global $panel_collapse; $panel_collapse = $collapse;
   
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
   echo "<td class='scapmain'>$title</td>\n";
   if ($collapse == true) {
      $boxname = str_replace(" ", "", $title);
      echo "<td class='scapmain' >".panelbutton($state, $boxname)."</td>\n";
   }
   echo "</tr>\n</table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='100%' '>\n<tr>\n";
   echo "<td class='side-body'>\n";   
   if ($collapse == true) { echo panelstate($state, $boxname); }

}
i what to add 'panel-footer' image, (It's like 'scapmain', but in the end of panel )

i tryed to do it myself, my experiment went like this B
function openside($title, $collapse = false, $state = "on") {

   global $panel_collapse; $panel_collapse = $collapse;
   
   echo "<table cellpadding='0' cellspacing='0' width='343' >\n<tr>\n";
   echo "<td class='scapmain'>$title</td>\n";
   if ($collapse == true) {
      $boxname = str_replace(" ", "", $title);
      echo "<td class='scapmain' >".panelbutton($state, $boxname)."</td>\n";
   }
   echo "</tr>\n</table>\n";
   echo "<table cellpadding='0' cellspacing='0' width='343'>\n<tr>\n"; 
   echo "<td class='panel-footer' ></td>\n";   
   if ($collapse == true) { echo panelstate($state, $boxname); }
}
It worked this way , but i know that's not correct (w3 validator says the same : } )
Anyone could help me to make it right :) with A code example.
0 replies

6 posts

N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

The footer of the panel belongs in the closeside() function.

It would look like

Title (Header) (openside)
Body (Content)
Footer (closeside)
0 replies
E
exe_work
E
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

I really forgot about that one :)) THX.
..So I just put a echo "<td class='panel-footer'>"; like this at
function closeside() {
      global $panel_collapse;
 echo "<td class='panel-body'>\n"; 
   if ($panel_collapse == true) { echo "</div>\n"; }   
   echo "</td>\n</tr>\n</table>\n";
}
or skipped some code part ? and do I need any edit at previously code A :) ?
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Take a peek at another theme.php file different than your own and you'll get a better example of how it should look.

The way your code looks as is is not W3C valid as your div cannot be there.

Run a validation check and you'll see the error. Or at least you should.

Your closing tags aren't matching up.

openside {
<table><tr><td>
}

closeside {
</td></tr></table>
}

Something like that.
0 replies
E
exe_work
E
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Ok i'll try my best :) Thx for your help.
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]function closeside() {
global $panel_collapse;
echo "<td class='panel-body'>\n";
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
}[/syntaxhighlighter]

Quote

Remember : the </td> tag in the above Code is used for ending the started <td> tag in openside() function.


So, in order to close your <td class='panel-body'>, you have to add </td> in the closeside() function before the the <td class='panel-body'> for the side-body, i.e, the function should be :

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]function closeside() {
global $panel_collapse;
echo "</td>\n</tr>\n<tr><td class='panel-body'>\n";
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
}[/syntaxhighlighter]

Please have a look at the end on openside() function :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false] echo "<td class='side-body'>\n";[/syntaxhighlighter]

He has started a TD tag which you have to end before you use your custom panel-body... smile

Please try and let us know... smile
0 replies
E
exe_work
E
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Yes success! :) now i'm css and html validate. (about those <td> , i was using it before, but it didn't help, so i realease that i doing something wrong :) so i put it with all my mistake in order to get full help in witch parts i was wrong)
Thx Ankur ! It's really nice feeling then I learn new lessons with php-fusion together with Your support guys :)
0 replies

Category Forum

Themes Support

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
E
E
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet