Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.
Attachments
63702-sidebar.6.2.zip (0 Bytes, 101 downloads)

Last edited by JustDave; 01/05/2003 2:41 PM.
Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I switched this on here and force fed everyone with the option to view it. LoL

You can turn it off by editing your display prefs.

I'll switch it off for everyone by editing the theme settings.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Kind of scared me there Dave All of a sudden it appeared as if by magic!

Looks cool. What is the purpose of it? (or am I being daft here?)

Warm regards

Nikos


Nikos
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
When I had this for a while.... and we put some ads in it. I tweaked the display prefs, so that only paid supporters could turn it off.

Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That should be easy enough to do with this mod.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks

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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That's a good idea. Options are options, and some people like to have options.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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

Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Is there an easy way to put IIP in the sidebar?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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)

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
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.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That is one of the drawbacks. The other is that the number of queries will definately increase in relation to the number of pal boxes being used.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I'll take a look at Dave's code and post the user group restriction bits here.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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.

Excellent work.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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.

Thanks again Dave for your work.

Ian





Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.


Hope this works for ya!

Attachments
63798-SidebarForGroupOnly.txt (0 Bytes, 63 downloads)

Joined: Oct 2000
Posts: 53
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 53
Great!!! You are the just reason why I'm using UBB!

Thanks

Junhyok

Joined: Oct 2000
Posts: 53
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 53
You are the reason why I'm choose UBB!

Great Thanks

Junhyok

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ooh. Thank you.

I guess InfoPop should be sending me my commission shortly then? LOL

Thanks. Glad it works for you.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
this is really cool Dave


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ta Da!

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3




- Allen wavey
- What Drives You?
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Can anyone lend a thought...

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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
i would double check the code and includes in the ubbt.inc.php file.

You said you were sure the database was taking the changes for sidebar preferences...right?

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Thanks, Josh.

Yeah. I traced the DB change and the edit making the change when requested through the front end.

I thought it was the uubt.inc.php, but I checked it several times. I'll get some sleep and check again

I thought it was funny that I'm not breaking or generating any errors.

Where does this sidebar determine the width from?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
The width is in the theme file. You might check over those changes too.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
LOL - I know that feeling.

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.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
how difficult would it be to pull some of the pals (who's online, featured member, etc.) into this?


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I've been looking at that. You'd need to modify the pal to operate independently from index.php (thus create a self contained pal).

Then I think you would do your includes inside ubbt.inc.php where you include the sidebar.

I would love to also get "hot topic" working on the sidebar too. I've done the shoutbox with success.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

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.

Page 1 of 3 1 2 3

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)