PDA

View Full Version : Conditional Forum Subscription Links


VAN
04-02-2004, 10:00 PM
My first public offering. :)

It's a small one, but one that I feel is pretty important as far as user-friendlieness goes.

DESCRIPTION:
Ever notice in forumdisplay.php that you will always see a link to "Subscribe to Forum", even if you are already subscribed? This small hack fixes this issue by helping to more easily identify which FORUMS you are already subscribed to.

After installing this hack, you will see a link to "Unsubscribe From This Forum" in
forumdisplay.php IF YOU ARE ALREADY SUBSCRIBED. Otherwise, you will see a link
to "Subscribe to This Forum".

Not to be confused with the Subscribe/Unsubscribe functionality of showthread.php, which works fine. :)

Support will be offered *when possible* in THIS THREAD, but if you follow the simple installation, you shouldn't need any support anyways. :D


NOTE: If your Subscribe to Forum link brings up the Subscribe to Thread page, and the redirect is acting funny, that is not related to this hack. It is a bug in vB3 and you need to upload an updated version of subscription.php that can be found on vbulletin.com (link below)

http://www.vbulletin.com/forum/showthread.php?p=638245#post638245

tilight
04-03-2004, 01:53 AM
Thanks, good hack *installs*.

Slave
04-03-2004, 02:06 AM
hmm .. just tried this and it comes up with a mysql error saying the "subscribeforum" table doesn't exist ....

VAN
04-03-2004, 02:16 AM
hmm .. just tried this and it comes up with a mysql error saying the "subscribeforum" table doesn't exist ....

Wow. That's odd. Are you currently able to add/remove Forum Subscriptions at all??

in your admincp, run this SQL Query and see if it returns an error:

SELECT * FROM subscribeforum

If it still cant find the table, you probably have some kinda db corruption going on. You could log-in via phpMyAdmin and verify if the subscribeforum table actually exists. If not, then we can create it, but you may have other issues as well.

Slave
04-03-2004, 02:18 AM
heh .. sussed that .. I had to put "vb3_" in front of the table name ... :)

VAN
04-03-2004, 02:22 AM
heh .. sussed that .. I had to put "vb3_" in front of the table name ... :)


Doh! I forgot " . TABLE_PREFIX . " Sorry! Attachment fixed.

Slave
04-03-2004, 02:25 AM
hmm .. another problem ..

It doesn't seem to want to subscribe to the forum ..

(see image) .. I get to that page .. click on the link and it doesn't go to the "processing" page .. it just goes back to the page in the image .. and therefore doesn't register the forum as subscribed ..

??

Slave
04-03-2004, 02:29 AM
Just tried it with the updated stuff .. still no joy .. see post above ..

VAN
04-03-2004, 02:29 AM
hmm .. another problem ..

It doesn't seem to want to subscribe to the forum ..

(see image) .. I get to that page .. click on the link and it doesn't go to the "processing" page .. it just goes back to the page in the image .. and therefore doesn't register the forum as subscribed ..

??


Ahhh! This is acutally a bug in vB3. They have posted a new subscription.php file over at vb.com. I had already fixed mine, and I totally forgot about it. ALso updated first post with a note about this.

http://www.vbulletin.com/forum/showthread.php?p=638245#post638245

Slave
04-03-2004, 02:34 AM
Ok .. tried the new subscription.php file ..

It's now showing the processing page .. but still isn't registering the forum as subscribed ...

Slave
04-03-2004, 02:38 AM
hmm .. getting silly now :p

I downloaded the .php file again .. (just in case)

It's now registering the forum as subscribed in the userCP .. but isn't showing "Unsubscribe From This Forum" in the dropdown menu .. which of course is the whole point of the hack! .. *cough*

:D

VAN
04-03-2004, 02:39 AM
Ok .. tried the new subscription.php file ..

It's now showing the processing page .. but still isn't registering the forum as subscribed ...


Wow. Sorry for all of this hassle. I'll take the blame for your first problem since I forgot the table prefix. :D

If you have added the new subscription.php, and made the changes as in the text file, all should be fine. Works on my testboard, and tilight up there seems to have installed w/o any trouble.

How about if you reverse the install process (its a small hack), and start over. Now that everything is in place (new file, table prefix line) you should be A-ok. :)

Slave
04-03-2004, 02:41 AM
heh .. I'm glad I did this on my dev board .. :)

I'll uninstall and give it another shot .. :)

VAN
04-03-2004, 02:41 AM
hmm .. getting silly now :p

I downloaded the .php file again .. (just in case)

It's now registering the forum as subscribed in the userCP .. but isn't showing "Unsubscribe From This Forum" in the dropdown menu .. which of course is the whole point of the hack! .. *cough*

:D


Double Doh! I dont use the DHTML pop-ups, so I totally forgot about those! It works if you dont use the pop-ups. My fault. Gimme a minute and I'll post the update. Many apolgies, Slave!

Just to see that it works, switch off the DHTML menus and look at the links at the bottom of forumdisplay.php. :D

I'll have a new file shortly...

VAN
04-03-2004, 02:51 AM
File has been updated. Really sorry, Slave. And here I was all jazzed about posting my first hack. lol

You should be good to go now. ::crosses fingers::

Slave
04-03-2004, 03:03 AM
\o/

Looks like it's working ..

\o/

Thanks for sorting it out .. :D

(just got to put it onto my main forum now .. :p)

VAN
04-03-2004, 03:07 AM
I'm just glad you were here for this thread. I dont use table prefixes or DHTML menus, so I wouldnt have found out about these issues until someone mentioned them. Luckily you use prefixes AND DHTML menus, so you were a good tester. :D

Thanks for being patient. (dont forget to click Install ;) )

Slave
04-03-2004, 03:09 AM
Install clicked!!

:)

bugger .. all that just to have something that should be there anyway .. heh :)

* Slave goes for a ciggy ......

gmarik
04-03-2004, 06:21 AM
This would be nice by defaylt...

VAN
04-03-2004, 06:27 AM
This would be nice by defaylt...

I agree. I dunno why they didnt add it. They added it for threads. ::shrug::

Boofo
04-03-2004, 06:31 AM
Excellent job on your first hack. Clicking install. ;)

Now, is there a way to do this on the forumhome? ;)

djohn
04-03-2004, 02:02 PM
Right, after some stress with the subscription.php i got it to work. Thanbks a lot!
/me clicks Install