Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
#242835 04/15/2003 9:19 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: IIP SidebarPal 1.1

Description: This allows a user selected sidebar (left/right/off) of IIP pal boxes. It's fully configurable, you you can decide what boxes you want to display, and in what order they display.

Version 1.1 fixes the issue of "headers already sent" errors on some servers.

Working under: Instructions written for UBB.Threads 6.3, but probably could be interpreted to 6.2.

Any pre-requisites: IIP 5.3 or 5.3.1

Author(s): JustDave from chattersonline.com
for discussions and bugs go to www.ubbdev.com

Date: 4/15/03

Credits: JoshPet for putting the instructions together

Files Altered: admin/edittheme.php, admin/doedittheme.php, admin/editconfig.php, admin/doeditconfig.php, editdisplay.php, changedisplay.php, ubbt.inc.php, templates/editdisplay.tmpl

Database Altered: Yes, one field added to the w3t_Users table to store the user's sidebar preference.

New Files: sidebar_leftopen.tmpl, sidebar_leftclose.tmpl, sidebar_rightopen.tmpl, sidebar_rightclose.tmpl, sidebarpal.php

Notes: This is based on JustDave's sidebar mod. He had put together a sidebarpal.php script which we were using here, and had planned on including it in the next release in IIP. But he's been away for a while, and so many people keep asking for it, hopefully he won't mind that I put this together and released it.

[b]Updated - 4/18/03 - to fix things looking off center when you weren't using 100% table widths.
Attachments
75896-IIP SidebarPal 1.1.zip (0 Bytes, 233 downloads)

Last edited by JoshPet; 06/27/2003 12:20 AM.
Sponsored Links
Daine #242836 04/15/2003 9:25 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768

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: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I downloaded this, but I'll have to work on adding it tomorrow. I'll let ya know how it works out!

eslmix #242839 04/15/2003 11:11 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I just installed it at www.measurection.com

Seems to be working fine... although I noticed that if you enable the current poll in the sidebar.... it doesn't work right. You can't vote.

So for now, don't use that option. If JustDave returns maybe he'll fix it. If not... maybe I'll fix it. But it's low on the list.

Sponsored Links
Daine #242840 04/16/2003 2:56 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks for posting



Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I noticed after installing it that once you enable it it stays on that side so if you select left it stays left even if you change it to right.

The spacing between the sidebar and forums is a bit tight. A work in progress I see

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I should move left/right based on your user preferences.

Like it does here.

Will it not switch sides for you?

I'd check and make sure the new preference is getting stored in the database in changedisplay.php when you make the change. 1 for left, 2 for right, 0 off.

Daine #242843 04/16/2003 5:14 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
It won't move from the admin theme config.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Remember...as with all theme settings, theme settings only apply for unregistered users... and new users.

Existing users, like yourself, will need to change their preference in the display preferences of My Home.

Try changing it there... it should move for you.

Sponsored Links
Daine #242845 04/16/2003 5:30 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay yes I remembered that after posting. Okay here is a summary of what I see

The sidebar works fine on the left except there is no break between the forums and sidebar.

The sidebar when switched to the right half the boxes come up SQL ERROR database only visable to administrator and half work when on forum list or postlist. Now it works fine in other site pages like extras and places like my home and who's online. The error only happens when on the forumlist or postlist

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The spacing problem can be solved for the leftopentemplate by adding this just like the other right one has

<td width="10">
 
</td>

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Did you add $dbh to the global call in the send_footer function? Without that it can't do queries in the right sidebar.

Are you doing it on a test site? If so, let me know where and I'll look.

Daine #242848 04/16/2003 5:41 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I am pretty sure I added that on the line you said.

Just checked and this line

global $dbh, $config, $theme, $thispath, $VERSION, $ubbt_lang, $tempstyle, $timea,$querycount,$zlib,$fheader,$Board,$mysqltime,$debug,$debugprint;

is indeed there

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That's odd. Try adding $user into it, like this:

global $dbh, $config, $user, $theme, $thispath, $VERSION, $ubbt_lang, $tempstyle, $timea,$querycount,$zlib,$fheader,$Board,$mysqltime,$debug,$debugprint;

Daine #242850 04/16/2003 5:54 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You know... I'm at a bit of a loss. I think it's because it's coming after the photopost stuff.... which is monkeying it up somehow.

Let me ponder that a bit.

Daine #242851 04/16/2003 6:07 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Actually the Photopost stuff is called in between and as part of the main index. The sidebar is not called till after the forum closes. It only happens on the main index I see what your getting at. Let me get a clean no Photopost index and test that.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yep I tested it and yep I found a buggy. Adding Photopost to the main index messes with the sidebar. I removed Photopost and it works on the right. However Photopost is more important to me though. Just let me know what ideas' ya have so we can play and get this one stomped.

I myself am at a loss at my Photopost template would mess it up. Maybe the calls between two databases.

Daine #242853 04/18/2003 12:37 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
sidebarpal.php

Code
	if (is_array($HTTP_GET_VARS)) {<br />		while(list($name,$value) = each($HTTP_GET_VARS)) {<br />			${$name} = stripslashes($value);<br />		}<br />	}<br />	if (is_array($HTTP_POST_VARS)) {<br />		while(list($name,$value) = each($HTTP_POST_VARS)) {<br />			${$name} = stripslashes($value);<br />		}<br />	}<br />	if (is_array($HTTP_COOKIE_VARS)) {<br />		while(list($name,$value) = each($HTTP_COOKIE_VARS)) {<br />			${$name} = stripslashes($value);<br />		}<br />	}


This is the same code that UBB.threads formerly used to manually "register" global variables, that Rick went to great lengths to get rid of using get_input().

joeuser #242854 04/18/2003 12:43 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I think Dave had written it under 6.1

Havent' really looked at what variables were used etc.... I could go through and add the get_input functions instead.

Daine #242855 04/18/2003 2:54 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[6.3b1]

Cosmetic problem: the sidebar and other forum stuff in the middle of the page appear to be aligned left, while the top menu and footer are center-aligned.

I notice that problem doesn't occur here. In fact, it looks like the stuff in the middle is in its own table cell.

Any ideas? Is it possible that other files need to be modified for this hack?
Attachments
76299-Image1.gif (0 Bytes, 45 downloads)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Well it doesn't happen here because we run 100%.

The easy answer.... in my instructions was that it run best in 100% width. Otherwise it looks off center.

This problem seemed to exist in JustDave's user selectable sidebar mod... which is what I merged the sidebar pal he was using here with. The advice was always to run 100%

When I first tried to track that down... I assumed we needed an "align" center" to the td tag... but that's not it.

I never could solve it before.

Edit:
I fixed it and will update the Zips momentarily.

Dave in sidebar_leftopen.tmpl and sidebar_rightopen.tmpl

Add:

align="center"

into the line where the table get's opened.

Looks like the table is 95% but off center.

I'll be updating the zips in just a minute.




Daine #242857 04/18/2003 3:12 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated the Zip!
Thanks Dave.

Daine #242858 04/18/2003 3:24 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Thanks, that fixed it.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Whew - that one was easy.
I got big shoes to fill trying to support JustDave's stuff.

Daine #242860 04/18/2003 3:59 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay well something is going on weird. I uploaded the new templates and sidebarpal and it does space fine with a 95% width

I had to add in the left open like it has in the rightclose so there is a space inbetween the sidebar and forum.

However now this is totally weird. My Photopost categories on the photopost hack to display on main forum is gone. The featured photo's are there. I have no idea what is going on. Photopost categories are there in photopost. The only change made is with this new sidebarpal script and they did not come back with it set to blank in theme-inc.php

<td width="10">
</td>


Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ack. I don't know how that could affect photopost. It's basically a template mod (to do the sidebar).

I don't have that installed on any of my testing sites, so I havne't really played with the photopost thing.

Daine #242862 04/18/2003 4:20 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I know well it looks to be unrelated as I installed backup files and the Photo's appear but the cats do not.

OKay well still the right side pal bar does not work right with Photopost still/

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Solved the Photopost thing.


Okay the sidebar worked except for the right before now I updated the sidebarpal and I get version mismatch. I am using 5.3.1. It is a version mismatch with 5.3 or 5.3.1 running.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I feel bad for having to ask, but what does this mean:

- Edit your Theme file. Fill in the sidebar type and sidebar width.
(Example: Sidebar Type: left Sidebar Width: 20%)

Edit what Theme file?

gailg #242865 04/18/2003 9:10 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Admin -> Edit theme settings

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Ahhhh..... I did it the hard way! lol (manually looked at code to add to the theme.inc.php file!

sigh*

Ate a big steak dinner at Mortons; must have slowed me down...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
That's kind of a bogus error. The $VERSION variable was getting lost.

I discovered you needed to add $VERSION to the global call in the header or else you got it on the left.

I don't knwo why you'd get it on the right. $VERSION is used in the footer and already in the global call down there.

You can get around it by removing or commenting out this from the sidebarpal.php


if (!stristr($VERSION,"6.2") and !stristr($VERSION,"6.3")) {
$VersionNotice = "<br /><br /><strong><span class="standouttext">Version missmatch!</span> IIP $palVersion will not work with UBB.threads™ $VERSION.</strong>";
}


It's just the check that it's the right version of threads. But when threads upgrades, you'll most likely need to update the sidebarpal if you get errors.


once you take that out, it should get by it.

Daine #242868 04/18/2003 9:57 PM
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
http://www.viperalley.com/ubbthreads.php

Got it up with all the extras - PhotoPost, ReviewPost, PhotoPost IIP, ReviewPost IIP.

gailg #242869 04/18/2003 10:15 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Cool.

I can't wait to check out review post.

Daine #242870 04/18/2003 10:56 PM
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Ignore that. Corrupted theme.inc.php

Last edited by extremebikini; 04/18/2003 11:03 PM.
gailg #242871 04/18/2003 11:17 PM
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Unfortunately, this hack also suffers from the "never updating IIPs" for those who have active boards. Everytime someone loads this page, it resets the date variable so that an IIP never times out as long as people are hitting the page within the interval.

To fix this, I added the code below (in bold) to the sidebarpal.php:

[] $dbh -> finish_sth($sth);
if ($RefCache && $user['U_Status'] = "Administrator") {
$LastCacheTime = 0;
}

if ( $date > ($LastCacheTime+600) ) $LastCacheTime = 0;

if (empty($forcepublic)) {
[/]

then a little lower:

[] }

if ( $LastCacheTime != 0 ) $date = $LastCacheTime;

$date_q = addslashes($date);[/]

Basically, I'm telling the IIPs to do a refresh ever 10 minutes. Putting LastCacheTime to 0 forces a refresh and I have all the defaults set to 15 minutes.

I know its a little kludgy, but otherwise the pages never update (unless nobody is on my site for 15 minutes!)

gailg #242872 04/19/2003 1:56 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Cool, I reported this sidebar/photopost problem a few months back and never could figure it out... I shoulda called in the calvary back then


- Allen wavey
- What Drives You?
Daine #242873 04/19/2003 5:22 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Maybe Michael is the best to answer this one. Josh I added the version call to the header in ubbt-inc The sidebar works on the left just like it did in the last version. Now with your latest version it is even worse on the right tables everywhere sql errors etc. Now I see Michael has it working on the right. Any Ideas Michael?

Just another little note also. I notice at 100% everything views fine. at 95% it is centered so you fixed that yet if you have extra content like photopost those tables are smaller than threads ones. This does validate so I looked through and just figured I need a drink. To better explain threads when set to 95% when the Photopost tables go to 90% This sidebar is killing me. I have rechecked hacking over a dozen times and this darn thing does not like my site or something.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Dumb luck, I suppose; I dont recall making any changes to get it to work (never didn't work for me). I did have to cleanup the code I posted above and take out a couple <br /> tags for spacing - and I noticed the instructions didnt always match the code I had (6.2.3), but I figured out what needed to be done.

Dumb luck?

Page 1 of 5 1 2 3 4 5

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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 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 20240430)