PDA

View Full Version : Forum Display Enhancements - Global Threads for VB3


BirdOPrey5
01-30-2011, 10:00 PM
This mod is based off a VB 3.6 mod by randominity here:
https://vborg.vbsupport.ru/showthread.php?t=129626
He gave me permission to further develop this mod.

It is ESSENTIAL if you upgrade to this version from the original 1.0.1 version you UNINSTALL the old one first. This isn't a suggestion, this is a REQUIREMENT.

This mod allows you to display "global threads" in your forums. Global Threads are threads that show up in every forum (or forums you specify) as opposed to just a single forum.

This is perfect for important site news, forum wide polls, and anything worthwhile to be displayed forum wide.

I know you could make an announcement but people ignore announcements, and you can't reply to them like threads. These are real threads and if you don't take away permission people can reply to it like any other thread. Replies in any forum show up in all forums.

Same thread in multiple forums:
http://www.juot.net/forums/forumdisplay.php?f=48
http://www.juot.net/forums/forumdisplay.php?f=43
http://www.juot.net/forums/forumdisplay.php?f=20
(It's under the sticky threads.)

This mod requires a little work on your side- you must first create a "global forum." I suggest calling it "Global Forum" and in the forum manager when creating it, choose to "Set Active" set to "No" so it won't show up in your forum lists but will be accessible directly by you to post new threads in.

I have greatly increased the number of options over the original mod and believe I have implemented all the good suggestions ever made for the original mod.

This version will work on vB 3.8.x and should work on 3.7.x too.

I have marked this as BETA as there is 1 unresolved minor bug- it has been a bug since this mod came out but no one seems to have noticed or cared. When showing global threads the small arrow indicating if you had posts in the global thread won't snow.

See screenshots for a Global Thread example. The Global Thread globe icon is optional.

Full instructions in zip file.

BirdOPrey5
01-31-2011, 06:30 PM
Reserved.

Kaelon
02-01-2011, 09:07 PM
This looks really interesting. What is the performance impact? Can you tell us a bit about the queries you used?

BirdOPrey5
02-01-2011, 09:22 PM
There is 1 additional query on each page view of forumdisplay.php.

The query is identical to the query that pulls all the threads for the specific forum you are viewing.. basically vbulletin queries the database for all threads in forum X (the forum you're viewing) LIMIT by the number of threads per page. The after vBulletin pulls its threads, this mod goes ahead and pulls all threads from forum Y (the global forum) LIMIT the number you set in options.

The 1 query adds no noticeable performance loss IMO.

Hellmaster
02-03-2011, 01:51 AM
Does it work as a global announcement? But this is a Thread which can be replied?

BirdOPrey5
02-03-2011, 12:21 PM
Basically it's like a global announcement that can be replied to... But it's listed as a thread (either above or below stickies) not listed as an announcement.

MagicThemeParks
02-04-2011, 10:23 AM
Looks very cool. I may have to use this one too Joe :)

blackberry
07-02-2011, 11:32 AM
its giving me following database error

Database error in vBulletin 3.8.4:

Invalid SQL:

SELECT
IF(votenum >= 1, votenum, 0) AS votenum,
IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
thread.lastpost, thread.lastposter, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach,
hiddencount, deletedcount

, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
, threadread.readtime AS threadread
, threadredirect.expires
, post_user.displaygroupid AS post_user_displaygid, post_user.usergroupid AS post_user_usergid, last_post_user.displaygroupid AS last_post_user_displaygid, last_post_user.usergroupid AS last_post_user_usergid
FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')

LEFT JOIN threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = 2)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)

LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
WHERE thread.forumid = 4
ORDER BY lastpost DESC
LIMIT 5;

MySQL Error : Unknown column 'post_user.displaygroupid' in 'field list'
Error Number : 1054
Request Date : Saturday, July 2nd 2011 @ 07:28:58 AM
Error Date : Saturday, July 2nd 2011 @ 07:28:58 AM
Script : http://+++++.com/forum/forumdisplay.php?f=92
Referrer : http://+++++.com/forum/index.php
IP Address : 94.172.151.125
Username :
Classname : vB_Database
MySQL Version : 5.0.92-community-log

BirdOPrey5
07-02-2011, 12:37 PM
Do you have access to phpmyadmin?

I've seen on rare occasion people who don't have the field displaygroupid in their user table before.

Please go to phpmyadmin, browse to your database, and view the user table.

See if you have the column called displaygroupid.

If not you should go to STRUCTURE -> Add 1 filed after membergroupids and call it displaygroupid type smallint(5).

It is of course good practice to backup your database before changing it.

blackberry
07-02-2011, 01:36 PM
I have both membergroupids and displaygroupid field both their values are 0 ?
Image attached

BirdOPrey5
07-02-2011, 03:01 PM
I re-checked this mod and "displaygroupid" is never queried by this mod so I'm thinking there is probably a conflict with another mod you may be running.

There might be an easy fix...

If you go to your Admin CP -> Plugin Manager -> Edit the Plugin Query Global Threads

Find the code:
$hook_query_fields
and just delete it.

Let me know if you still get the error and if not does it look like everything is working- this change will only affect global threads.

blackberry
07-02-2011, 04:41 PM
yep working fine now thanks

home9000
09-24-2011, 09:11 AM
Dear BirdOPrey5

any one he in the coventry list will get database error

BirdOPrey5
09-24-2011, 02:23 PM
Dear BirdOPrey5

any one he in the coventry list will get database error

Indeed it does.

For a quick fix go to your Admin CP -> Plugin Manager find the plugin Query Global Threads and edit it.

Find the 3 instances of "replycount" (no quotes) and replace them all with "thread.replycount" (also no quotes.)

That will fix the database error. I will incorporate the fix into the next release. Thank you for letting me know. :up:

home9000
09-24-2011, 02:49 PM
Indeed it does.

For a quick fix go to your Admin CP -> Plugin Manager find the plugin Query Global Threads and edit it.

Find the 3 instances of "replycount" (no quotes) and replace them all with "thread.replycount" (also no quotes.)

That will fix the database error. I will incorporate the fix into the next release. Thank you for letting me know. :up:

Your are the best
Thanks too much it's working fine now

mastersat
09-24-2011, 04:21 PM
thanks a lot
i will test it

home9000
10-17-2011, 04:11 PM
Can we have this option

https://vborg.vbsupport.ru/showthread.php?t=194813&highlight=sticky

BirdOPrey5
10-17-2011, 07:23 PM
That "Sticky" line does still work with Global Threads- This is a screenshot of it on my forum:

https://vborg.vbsupport.ru/external/2011/10/28.jpg

I use the setting to show the Global Threads "Below Stickies" in the mod options.

home9000
10-18-2011, 01:50 AM
That "Sticky" line does still work with Global Threads- This is a screenshot of it on my forum:

https://vborg.vbsupport.ru/attachment.php?attachmentid=133912&stc=1&d=1318882965

I use the setting to show the Global Threads "Below Stickies" in the mod options.

You are right but I ask to have one between sticky and global

BirdOPrey5
10-18-2011, 09:08 AM
I will see what I can do.

MentaL
10-18-2011, 03:31 PM
cheers for this.

home9000
11-11-2011, 11:55 AM
I will see what I can do.


I know you :cool: are busy
just to remind you if you have time

Crimdog
05-05-2012, 10:27 PM
Bumping this back from the dead:

Having an issue where the thread name is displaying one column to the right, rather than in the default position. Thoughts?

EDIT: I fixed that portion, seemed to be template issue with custom style.

Now, I can view everything if I'm an administrator, however my test user shows only a blue horizontal box with a new post icon to the left of this box. Thinking these two things are related.

BirdOPrey5
05-06-2012, 01:42 AM
You should try it on the default style so as to be sure if it's a style issue or some other problem.

You can install the default style by going to Admin CP -> Style Manager -> Add a New Style -> Create a new style wit No parent style.

This will be the default style.

Make it user accessible, at least for a couple minutes, and let me know if it's working under the default style or not - if not a screenshot of what you see would help.

Crimdog
05-06-2012, 01:38 PM
I figured it out, it was related to the above post I made with commenting out that "box" portion. I didn't comment the whole thing out, only a portion. That made the box take over the entire row.

All is good now :)

mahmo0od
05-07-2012, 01:05 AM
nice mod
i will try it

Crimdog
05-07-2012, 08:45 PM
nice mod
i will try it

It's a FANTASTIC mod. Excellent idea and already tons of use for it on our site. We used it to generate a site-wide "manifesto" or FAQ regarding technical issues pertaining to cars we tinker with.

Morrus
06-13-2012, 03:12 PM
Awesome idea for a mod.

If you ever update it, can I make a feature request? Allow specific threads in the source forum to be tagged as global or not (i.e. just ignore threads not marked as such); that'll enable me to use my news forum as the source forum, but just make the threads about a specific subject appear also in a specific forum.

BirdOPrey5
06-14-2012, 10:25 AM
If you ever upgrade to VB4 that is possible in the VB4 version: https://vborg.vbsupport.ru/showthread.php?t=279156

Morrus
06-14-2012, 02:05 PM
If you ever upgrade to VB4 that is possible in the VB4 version

Heh. Never gonna happen. Nearly a decade of customization on our current vBulletin installation; it would take months of hard work to upgrade to vB4 at this point.

BirdOPrey5
06-14-2012, 03:47 PM
I understand, my main forum remains on 3.8 as well. Problem is 3.8 lacks the hooks I'd need to convert the VB4 version to VB3 so it would be significantly more annoying to get the new version running on VB3- would likely need manual edits.

Jacek
06-13-2018, 09:36 PM
Hello,

I have still vb 3.8 and just find a problem with this mod. Admins and moderators can't open global thread. We get error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 29944349 bytes) in /public_html/vbulletin2/includes/functions.php(5737) : eval()'d code on line 2

Common users and guests can read this.
Can You help me?

Regards.

BirdOPrey5
06-13-2018, 10:21 PM
I can only suggest increasing the PHP Memory Limit to 256MB, see if that helps.

Jacek
06-14-2018, 11:28 AM
THX! It works! :)

Jack