Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 06-20-2016, 04:55 PM
cc10 cc10 is offline
 
Join Date: May 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 07-07-2016, 10:16 AM
Dave_The_Don's Avatar
Dave_The_Don Dave_The_Don is offline
 
Join Date: May 2011
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes help needed as the options are there in the admin settings but nothing is showing

Attached Images
File Type: jpg Image1.jpg (59.3 KB, 0 views)
Reply With Quote
  #3  
Old 07-08-2016, 10:35 AM
Dave_The_Don's Avatar
Dave_The_Don Dave_The_Don is offline
 
Join Date: May 2011
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 07-08-2016, 12:04 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Dave_The_Don
  #5  
Old 07-08-2016, 02:16 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Dave_The_Don
  #6  
Old 07-08-2016, 06:04 PM
Dave_The_Don's Avatar
Dave_The_Don Dave_The_Don is offline
 
Join Date: May 2011
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
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
Reply With Quote
  #7  
Old 07-08-2016, 06:42 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave_The_Don View Post
https://www.vbulletin.com/docs/html/...emplate_syntax
i hope this is what your talking about my friend
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.
Reply With Quote
  #8  
Old 07-21-2016, 03:21 PM
Dave_The_Don's Avatar
Dave_The_Don Dave_The_Don is offline
 
Join Date: May 2011
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
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')
		),
Reply With Quote
  #9  
Old 07-25-2016, 01:14 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04809 seconds
  • Memory Usage 2,276KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete