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
yes help needed as the options are there in the admin settings but nothing is showing
https://vborg.vbsupport.ru/attachment.php?attachmentid=155183&stc=1&d=1467893653
Dave_The_Don
07-08-2016, 10:35 AM
this is the code used in vb4
<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
<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
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/main/dev_vbulletin5_template_syntax
i hope this is what your talking about my friend ;):D
Replicant
07-08-2016, 06:42 PM
https://www.vbulletin.com/docs/html/main/dev_vbulletin5_template_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
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
'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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.