This modification will allow you to place a sidebar to the left or right of your .threads display. Members have the ability to select left/right/off from their display preferences as well. I believe I have everything covered in the instructions but I won't know untill someone else sets this up.
Some users want to add additional content to their forums by placing such content on the side. This allows them to easily accomplish this by editing just one file (when finished installing this). Once completed all that is needed is to bring the sidebar.tmpl file up in the online template editor and add your content. Users can decide if they want to see the content on the left or right side or not at all.
Cool work dave. I had been experimenting with this sidebar stuff from a previous thread. It is real cool that now I can turn it on and off and dowhatever I want without having the option of always on.
I know this is one of them things many would like but are not sure how to go about it. It's such a simple feature that perhaps Rick can work it into the base at some point.
I just updated this zip to include a missing quote. I don't believe it will validate without it. I also made the left/right open templates use the set theme width.
If you have installed this you only have to download this zip and upload sidebar_leftopen.tmpl and sidebar_rightopen.tmpl
There really isn't an easy way to go about it. The Shout Box is the easiest as you can use an <iframe> to display it. One would need to take the majority of the php code at the begining of the index.php page and place it into a file that can be included back into the index and also included into the side bar so that the pal boxes would function in the sidebar. You would then include what ever pal boxes you wanted into the sidebar. I haven't tried it with this version but this is basically what I'm doing with IIP pro. (well sorta)
Capito. I was also thinking about moving everything out of the index except for the news and putting it into the generic header. The only problem is that I'd lose the ability to easily select what I want to display.
I've done the shoutbox and tried to hack a hot topic into the sidebar. Never did succeed with a hot topic box. That might make a cool stand alone sidebar hack.
I like the idea of forcing this, since some will turn it off... just because they can. If you get that 'tweak' for paid subscribers to work with this, I'de be using it
Would be nice to perhaps have an ability to switch this off on all pages say via a flag in the php file - in case on certain pages it was not to be displayed at all (even if selected as being on by the user)
Also would be nice to be able to display different versions for different groups.
If your pulling this into pages that you do not wish to display it you need only set this variable ($config['iip_call']) to 1 prior to the send_header function.
$config['iip_call'] = "1";
Then that page will not display the side bar. I needed to avoid the bar while displaying the index.
Cool - I have a left navigation on several non-threads pages, all using threads static horizontal navigation - so this will enable me to offer this to certain users, and of course not display on those pages that already have a left navigation built in.
Am I also correct in saying that if I include the correct code within sidebar_leftopen.tmpl and sidebar_rightopen.tmpl, I can open a different sidebar.tmpl for different groups? Having quickly looked at the code this seems like the best place to control different menus for different groups.
The only actuall template that displays the sidebar itself is sidebar.tmpl and you should be able to use php code in the template file since it's is included in the regular way.
Attached to this post are instructions on how to restrict the ability to turn the side bar off to a specific user group.
- First install the mod per Dave's instructions.
- The follow my instructions to further modify the code. My instructions are written after JustDave's modifications.
What this does.
If the member is of the certain user groups (specify the user group number in the code), or an Admin or a Mod they will have the option to display the sidebar left, right or OFF.
If they are not an Admin, Mod or a part of the special usergroup, then they will only have the option to choose Left or Right. They won't have an "off" option.
If for some reason, they already have the sidebar "off" (before the mod was installed) then it will default to "left" when they edit their display preferences.
Question, can this be made so that the sidebar disappears when you are viewing a thread? Sometimes threads stretch the screen to the right and the sidebar might make it worse - might be nice to be an option, vb's adaptation of the php portal does this
This should be a fairly easy thing to add in. Since it starts from the send_header function which also looks to see what script we are being called from we can use that information and avoid putting the sidebar in with showflat/showthreaded php scripts.
I installed the Selectable side bar as downloaded 1/12/03. Made all changes to DB and files as requested... and yes I uploaded the tmpl files in /temlates/default. I think I triple check all changes . I verified DB change through phpMyAdmin.
I get no errors and no sidebars.
Since users were originally set to 0, I adjusted my options and tried both right and left sidebar settings in editdisplay. I also verified the changes made here in the DB... so I belive this function is working.
I also logged out and cleaned cookies... no change... no sidebar.
I thought the sidebar width maybe set somewhere to zero? I tried to override the width by placing a fixed width in the sidebar_leftopen.tmpl... still nothing, so I did re load the original 'open' file.
If anyone has any ides... I'll listen. Other wise I'll restory the files to original and try again. Oh.. what is the file file that would effect the actual display in the Main Index? Since I htink all the other stuff is working, maybe I can start there.
My apologies for being brain dead, which I trust was caused only by my lack of sleep. I followed the directions without thinking, so I never went into the Admin -> Edit theme settings to set my width
All is well. Now I can add Josh's edits... after a few more hours sleep
I've been in the habbit of skipping Saturday nights sleep and working through the night, then turning in early Sunday night to get myself back on schedule. Does make the brain a bit groggy sometimes.
I used to have a "left panel" script that could be used with IIP but this was a ways back. I'll look things over when I get a chance and make such a script again.
You shouldn't have to do the includes in ubbt.inc.php though. The should be able to be done from the sidebar.tmpl file itself.
Your mods are great! and THANKS to JustDave for the sidebars!!
2 questions: - If my sidebar is set for left display, The sidebar is starting at the edge of the display - no inset- even though I have my fourms set to 98% of width. If I understand the mod, this is because the sidebar is opended before the forums. How would I get some spacing on the left side... even if it were just a measured amount of pixels?
- When the bar is on the right, there could be less cushion between the board and the bar. Any way of adjusting this?
Comment: - The flags worked great for not showing on the index, showflat, showthreaded and newreply screens.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.