Adding a new sidebar

proxydesign

Visiolist-Fan
Hello,

I am planning to add a new sidebar (on the right side), which only should be shown on main-site. I think it needs to be added a plugin for that, am I correct? If that the case, how?

Any suggestions of how this is possible?

Thank you. :)
 

Basti

Administrator
Staff member
2 methods

1) use the {isfront}your sidebar code{/isfront} directly in wrapper.html. That would result in the sidebar to be shown only on page 1 of the rankings

2) if you want it on page 2,3,4 etc also, you will have to make a plugin
There you would need the usual default files ( language folder, blank index files like i told you last time )
- then action_array.php
Code:
$TMPL['your_template_tag'] = '';
if(isset($isfront) && $isfront == 1) {
    $TMPL['your_template_tag'] = base::do_plugin_skin('./plugins/YourPlugin', 'front_side_bar');
}
Update the template tag name, and the "YourPlugin" in the path. The template tag is then to used in wrapper {$your_tag}

- front_side_bar.html
This will hold your html code
 

proxydesign

Visiolist-Fan
Just a quick question, how can I edit the two tables (table on the main-site), and the table on the stats-page seperatly? Because I have changed the width of the table, which is because of the mainpage, it become tight also on the statspage.

I have tried to add a id inside the <table> command, like this:
HTML:
<table cellspacing="1" cellpadding="1" id="table2">
But it seems to not work to change the width on the stats-page... :)
 

Basti

Administrator
Staff member
The issue is that you gave your tables globally 450px width . That should be as it was, not sure but i think 100% it was original
On your ranking you need to define width via an id like you tried
id="rankings_table" ( good to name it a bit for what it stands )

It not worked for you, because you also have a width="100%" in the table html. If you remove that and then add 450px width to the css it will work.
Instead width="100%" width="450" would also work without adding new css
 

proxydesign

Visiolist-Fan
Hi again,

Just wondering how it is possible to add the newest members to this sidebar. I can't move the {$sidebar_1_bottom} tag from wrapper.html to front_side_bar.html, cause nothing is showing... Any other options?

Thank you.. :)
 

proxydesign

Visiolist-Fan
Also, when I click on the sidemenu where the category and ranking method is, and when I click on the pagination to the next site, - the sidebar disappear. Any solutions for this, please? :)
 

Basti

Administrator
Staff member
In your plugin you use this right?
Code:
if(isset($isfront) && $isfront == 1) {
To have it also show on page 2, 3 etc use this
Code:
if(empty($FORM['a']) && empty($FORM['cat'])) {
To have it also on categories
Code:
if(empty($FORM['a'])) {
As for the newest member or any other plugin who use that template tag, what is your plugin name? Try to name differently, mostlikely it is executed to early.
Try ZSideBar or so, so it the last plugin, maybe that works
 

proxydesign

Visiolist-Fan
Thank you,

The category does not work, but the page and ranking method works... Thank you! :D
If you don't have time to fix it, it is okey..You are the Visiolist-Angel!
 

Basti

Administrator
Staff member
Category will work, you added multiple of my code? its either this or that. The last code instead of what you had would show on all ranking related pages. If it is not, let me see your current full action_array.php code
 

proxydesign

Visiolist-Fan
Hmm, I replaced the code you gave me...
Anyway, here is the code:

PHP:
$TMPL['sidebarh'] = '';
if(empty($FORM['a']) && empty($FORM['cat'])) {
    $TMPL['sidebarh'] = base::do_plugin_skin('./plugins/SidebarH', 'front_side_bar');
}
 

Basti

Administrator
Staff member
Yes that code not shows in on category, its the code only for page 1,2,3
If you see my last code there, that is the one you want
 

proxydesign

Visiolist-Fan
Woah, me such an idiot...
Now the code is:
PHP:
$TMPL['sidebarh'] = '';
if(empty($FORM['a'])) {
    $TMPL['sidebarh'] = base::do_plugin_skin('./plugins/SidebarH', 'front_side_bar');
}
and it works perfect! Thank you again, Basti :)
 
Top