vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Moderators on forum index? (https://vborg.vbsupport.ru/showthread.php?t=322885)

cc10 06-20-2016 04:55 PM

Moderators on forum index?
 
hi

does anybody know how to add moderators to the forum index page? on vb4 we had our moderators under each forum and would like the same on vb5

any help appreciated.

thanks in advance

Dave_The_Don 07-07-2016 10:16 AM

1 Attachment(s)
yes help needed as the options are there in the admin settings but nothing is showing

https://vborg.vbsupport.ru/attachmen...1&d=1467893653

Dave_The_Don 07-08-2016 10:35 AM

this is the code used in vb4

HTML Code:

                                        <vb:if condition="$vboptions['showmoderatorcolumn'] AND $forum['moderators']">
                                                <div class="moderators">
                                                        <h4>{vb:rawphrase moderators}:</h4>
                                                        <ol class="commalist">
                                                                <vb:each from="forum.moderators" value="row">
                                                                        <li><a class="username" href="{vb:link member, {vb:raw row}}">{vb:raw row.musername}</a>{vb:raw row.comma}</li>
                                                                </vb:each>
                                                        </ol>
                                                </div>
                                        </vb:if>

or this
HTML Code:

                <vb:if condition="$show['moderators']">
                <div id="forum_moderators" class="forum_info_subblock">
                        <h5>{vb:rawphrase moderators_of_this_forum}</h5>
                        <ul class="commalist">
                                <vb:each from="moderatorslist" value="row">
                                        <li><a class="username" href="{vb:link member, {vb:raw row}}">{vb:raw row.musername}</a>{vb:raw row.comma}</li>
                                </vb:each>
                        </ul>
                </div>
                </vb:if>

how come its not added in vb5 when it shows in the settings

Replicant 07-08-2016 12:04 PM

There are several settings in the admincp that are left over from vb4 that are no longer functional and this may be one of them. They've been cleaning them up lately. You will probably need to update that template code to vb5 syntax and functions to get it to work properly.

noypiscripter 07-08-2016 02:16 PM

A PHP module could be created and be placed in the forum page. There seems to be no API to fetch the moderators given a forum nodeid. But in the PHP module you could do an SQL query to moderator table.

"SELECT userid from " . TABLE_PREFIX . "moderator WHERE nodeid=<forum nodeid>" ;

where <forum nodeid> can be retrieved by calling getRoute method from route API passing the URL of the forum.

Then upon getting all the userids of the moderators, you call the fetchProfileInfo method from user API to get info for each user.

I would post here when I get a chance to do the whole code for this.

Dave_The_Don 07-08-2016 06:04 PM

Quote:

Originally Posted by Replicant (Post 2573001)
There are several settings in the admincp that are left over from vb4 that are no longer functional and this may be one of them. They've been cleaning them up lately. You will probably need to update that template code to vb5 syntax and functions to get it to work properly.

https://www.vbulletin.com/docs/html/...emplate_syntax
i hope this is what your talking about my friend ;):D

Replicant 07-08-2016 06:42 PM

Quote:

Originally Posted by Dave_The_Don (Post 2573018)
https://www.vbulletin.com/docs/html/...emplate_syntax
i hope this is what your talking about my friend ;):D

Yep, that's it. Noypiscripter's plan is the way to go on this. You'll still need to do the template work but there will be some custom API you'll have to call from the template to get the info you need.

Dave_The_Don 07-21-2016 03:21 PM

Quote:

Originally Posted by noypiscripter (Post 2573006)
A PHP module could be created and be placed in the forum page. There seems to be no API to fetch the moderators given a forum nodeid. But in the PHP module you could do an SQL query to moderator table.

"SELECT userid from " . TABLE_PREFIX . "moderator WHERE nodeid=<forum nodeid>" ;

where <forum nodeid> can be retrieved by calling getRoute method from route API passing the URL of the forum.

Then upon getting all the userids of the moderators, you call the fetchProfileInfo method from user API to get info for each user.

I would post here when I get a chance to do the whole code for this.

could the desired info not be pulled from this section in the
./core/packages/vbforum/db/mysql/querydefs.php

Code:

                'usergroup' => array('key' => 'usergroupid', 'structure' =>array('usergroupid',
                        'usergroupid', 'title', 'description', 'usertitle', 'passwordexpires', 'passwordhistory', 'pmquota', 'pmsendmax', 'opentag', 'closetag',
                        'canoverride', 'ispublicgroup', 'forumpermissions', 'pmpermissions', 'calendarpermissions', 'wolpermissions', 'adminpermissions',
                        'genericpermissions', 'genericpermissions2', 'genericoptions', 'signaturepermissions',  'visitormessagepermissions', 'attachlimit',
                        'avatarmaxwidth', 'avatarmaxheight', 'avatarmaxsize', 'profilepicmaxwidth', 'profilepicmaxheight', 'profilepicmaxsize', 'sigpicmaxwidth',
                        'sigpicmaxheight', 'sigpicmaxsize', 'sigmaximages', 'sigmaxsizebbcode', 'sigmaxchars', 'sigmaxrawchars', 'sigmaxlines', 'usercsspermissions',
                        'albumpermissions', 'albumpicmaxwidth', 'albumpicmaxheight', 'albummaxpics', 'albummaxsize', 'socialgrouppermissions',
                        'pmthrottlequantity', 'groupiconmaxsize', 'maximumsocialgroups')
                ),


noypiscripter 07-25-2016 01:14 AM

I don't know what that's exactly for but I don't think that will pull all the moderators in a forum.


All times are GMT. The time now is 03:52 PM.

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.00996 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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