vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Possible or not? (https://vborg.vbsupport.ru/showthread.php?t=154707)

Sune24 08-08-2007 09:27 PM

Possible or not?
 
If any of you have used the World of Warcraft forums, you've probably noticed that whenever a WoW staff makes a reply to a thread, a blizz logo icon is placed next to the thread, making it visible to everyone that an official response has been made in that thread.

Why its nice?
For gaming forums in particuler, where you are debating changes, fixes, and upcoming patches, it is very useful and nice to read and find out what the official developers are saying about the game and the user feedback. However it's not very fun reading 20 page threads, only to find out theres not a single official reponse in the thread anywhere...

So I ask... is it possible to make this work for VBulletin?

Easiest would be making it a usergroup option in admin panel, right?
Where you can assign a certain post-icon to certain usergroups, and this icon will be forced to show up on the thread if a member of that usergroup create the thread or replies in a thread.

Possible?

(Example from WoW forums: http://forums.wow-europe.com/board.h...Id=11090&sid=1)

Cheers for reading!

ADD:

VBulletin already use similar code, for example if a thread is popular it changes the statusicon of the thread.

All I want is that it does this if a user from a specified usergroup makes a reply in a thread or starts a thread.

EvilKitty 08-08-2007 11:49 PM

Hmm, i like this - i'd be interested in installing this if someone could point out a way to go about it.

Sune24 08-09-2007 12:51 AM

Quote:

Originally Posted by EvilKitty (Post 1313168)
Hmm, i like this - i'd be interested in installing this if someone could point out a way to go about it.

It's a hugely popular feature on the WoW forums... I was really surpriced to learn it's never been coded for VBulletin.

It's so neat being able to skim a forum and see exactly which threads has actual replies from "officials" or in other words forum admin/staff, like on wow forums.

/

Coders Shack 08-09-2007 03:25 AM

would be a very easy mod, depending on the functionality your looking for. I could code on in 20 mins if your looking for one that doesn't support if the mod/admin is deleted it would delete the status.

Basically its a plugin, and new row in the thread table similar to the sticky one.

I don't the time right now though.

StrifeX 08-09-2007 12:09 PM

"I don't the time right now though." C'mon, you don't have 20 min to spare :( I just want to tell you 20 min is worth it for an amazing mod which will get lots of installs ;)

Princeton 08-09-2007 03:34 PM

this sounds like User Ranks .. am I missing something? :confused:

EnIgMa1234 08-09-2007 04:00 PM

In forumdisplay beside the thread though^^

Sune24 08-09-2007 07:26 PM

Quote:

Originally Posted by Princeton (Post 1313733)
this sounds like User Ranks .. am I missing something? :confused:

check out the link m8, in the original post :)

This thing is displayed next to the thread, same as a post-icon, making it so everyone can see theres an official reply in that thread.

Rank's don't do that, they just show a specific image inside the actual threads in the postbit area right?

Sune24 08-11-2007 11:50 PM

Hehe, I assume this is very hard to code...

Ive even offered to pay for it to be done..

2 coders contacted me, both of them vanished when they heard what I wanted :/ same as what is described above.

Andrew Green 08-12-2007 05:08 PM

Create a new posticon group in the control panel, set all the permissions to "no", (except maybe administrator / supermods)

Add the icon you want to use for official threads, make a note of its id number

Add a plugin for newpost_complete

Code:

if(is_member_of($vbulletin->userinfo, X))
{
  $vbulletin->db->query("
  UPDATE ". TABLE_PREFIX . "thread
  SET iconid = Y
  WHERE threadid = $threadinfo[threadid]
  ");
}

X is the usergroup you want to trigger this, Y is the iconid for the official icon.

It will override the icon already in use with the official one for the thread when someone from usergroup X makes a post in it.

Sune24 08-12-2007 10:03 PM

Quote:

Originally Posted by Andrew Green (Post 1316024)
Create a new posticon group in the control panel, set all the permissions to "no", (except maybe administrator / supermods)

Add the icon you want to use for official threads, make a note of its id number

Add a plugin for newpost_complete

Code:

if(is_member_of($vbulletin->userinfo, X))
{
  $vbulletin->db->query("
  UPDATE ". TABLE_PREFIX . "thread
  SET iconid = Y
  WHERE threadid = $threadinfo[threadid]
  ");
}

X is the usergroup you want to trigger this, Y is the iconid for the official icon.

It will override the icon already in use with the official one for the thread when someone from usergroup X makes a post in it.


Really appreciate you taking time on this.
I followed your instructions and it worked like a charm - now when I make a reply in a thread, the icon automaticly changes to the iconID I set in ur code.

Thanks a lot!

Paul M 08-12-2007 10:36 PM

or if you want to use the datamanager, try this ;

Code:

if(is_member_of($vbulletin->userinfo, X))
{
        $thread =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
        $thread->set_existing($threadinfo);
        $thread->set('iconid', Y);
        $thread->save();
        unset($thread);
}


Sune24 08-13-2007 01:02 AM

Quote:

Originally Posted by Paul M (Post 1316180)
or if you want to use the datamanager, try this ;

Code:

if(is_member_of($vbulletin->userinfo, X))
{
        $thread =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
        $thread->set_existing($threadinfo);
        $thread->set('iconid', Y);
        $thread->save();
        unset($thread);
}


I'm a newbie hehe :/

Can I ask you what the difference is between your code and Andrew's?
I mean ofc I can see the code is different, but other than the obvious, can you tell me whats the difference? Is your code more smooth for the server etc? :)

Dismounted 08-13-2007 06:10 AM

The datamanager (Paul's method) is the suggested way to do it, merely because it updates all the caches, etc.

Sune24 08-14-2007 08:53 PM

For some reason this code stopped working...

It worked perfect for 24hours, then just stopped working...
I've posted in 4-5 different threads on different boards and the icon remains the default one.

I'm the only super-admin with access to the plugin-codes and I've not changed anything, only double and tripple checked that the code is still there as it was the first 24hours where it worked fine.

I'm using the datamanage code from Paul M.

Any ideas why it would stop working? :confused::confused:

(add) Tried Andrews code and that works.
However Paul M's code also worked like a charm the first 24hours, so I'm really confused, and wonder if Andrew's code will also only work temporarely hehe.

Sune24 08-20-2007 10:45 PM

Any help would really be appreciated! :)


All times are GMT. The time now is 03:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01718 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete