vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Links Directory > vBa Links Directory v1.0 Support > Modifications

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2004, 03:12 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Module

This is a fairly easy hack, but I'm sure will be very useful for those who also have the CMPS installed. As the title states, it will add the number of links awaiting moderation to your 'Quick Moderation' module in the CMPS.

First, open your /forum/modules/moderat.php file and look for:

PHP Code:
eval('$home[$mods[\'modid\']][\'content\'] .= "' fetch_template('adv_portal_moderation') . '";'); 
Right Above that, Add:
PHP Code:
$links $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "links WHERE valid = 0"); 
Then open your 'adv_portal_moderate' template and add the following code where you wish:
Code:
<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validate" target="_blank">Links</a> ($links[count])</div>
That's it.

Last edited by Brian; 07-23-2004 at 03:42 PM.
Reply With Quote
  #2  
Old 07-19-2004, 03:41 PM
Shon Shon is offline
Senior Member
 
Join Date: Mar 2004
Posts: 135
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Worked perfectly, thank you
Attached Images
File Type: jpg qm_links.jpg (5.9 KB, 138 views)
Reply With Quote
  #3  
Old 07-19-2004, 03:44 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

I like what you did with that module.
Reply With Quote
  #4  
Old 07-19-2004, 04:01 PM
Shon Shon is offline
Senior Member
 
Join Date: Mar 2004
Posts: 135
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Quote:
Originally Posted by Brian
I like what you did with that module.
Why thank you
Reply With Quote
  #5  
Old 07-22-2004, 09:52 PM
bezzell bezzell is offline
Junior Member
 
Join Date: Mar 2004
Posts: 16
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Hmmm... I tried this and received the following error:

Quote:
Database error in vBulletin 3.0.3:

Invalid SQL: SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "links WHERE valid = 0 mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '" . TABLE_PREFIX . "links WHERE valid = 0' at line 1

mysql error number: 1064
Reply With Quote
  #6  
Old 07-23-2004, 12:22 AM
Shon Shon is offline
Senior Member
 
Join Date: Mar 2004
Posts: 135
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Quote:
Originally Posted by bezzell
Hmmm... I tried this and received the following error:
Use this instead:

PHP Code:
$links $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "links WHERE valid = 0"); 
Reply With Quote
  #7  
Old 07-23-2004, 03:43 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Oops, didn't realize that I had single 's in the query. Just updated the post.
Reply With Quote
  #8  
Old 07-23-2004, 10:40 PM
bezzell bezzell is offline
Junior Member
 
Join Date: Mar 2004
Posts: 16
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Thanks Shon & Brian - that works!
Reply With Quote
  #9  
Old 08-05-2004, 02:59 AM
pdatotaal pdatotaal is offline
Rollercoaster junkie
 
Join Date: Jan 2004
Location: Holland (temp Canada)
Posts: 78
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Works great..! Mhh Shon like to share your nice table?
Reply With Quote
  #10  
Old 08-05-2004, 07:55 PM
Shon Shon is offline
Senior Member
 
Join Date: Mar 2004
Posts: 135
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Quote:
Originally Posted by pdatotaal
Works great..! Mhh Shon like to share your nice table?
Well, since then I've added Link Posts and Join Requests... I took the join requests part of it out and left the link posts HTML, if you want to you can take it out or I may post the code for it later if nobody releases it or has released it yet....

Template: adv_portal_moderation
Code:
<!-- Quick Moderation Block -->

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="187">
<thead>
	<tr>
		<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('moderate')"><img id="collapseimg_moderate" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_moderate.gif" alt="" border="0" /></a>
<span class="smallfont"><strong>$vba_options[portal_blockbullet] $vbphrase[quick_moderation]</strong></span></td>
	</tr>
<thead>
<tbody id="collapseobj_moderate" style="$collapseobj_moderate">
	<tr>
		<td class="$getbgrow">
<table border="0" cellpadding="3" cellspacing="1" class="tborder" width="100%">
	
			<if condition="$show['threads']">
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=posts">Threads</div>
</td>
<td class="thead" align="center">$threads[count]</td></tr>
			</if>
			<if condition="$show['posts']">
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=posts#postlist">Posts</div>
</td>
<td class="thead" align="center">$posts[count]</td></tr>
			</if>
			<if condition="$show['events']">
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=events">Events</div>
</td>
<td class="thead" align="center">$events[count]</td></tr>
			</if>
			<if condition="$show['attachments']">
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=attachments">Attachments</div>
</td>
<td class="thead" align="center">$attachments[count]</td></tr>
			</if>
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$admincpdir/user.php?do=moderate">Users</a></div>
</td>
<td class="thead" align="center">$users[count]</td></tr>
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validate" target="_blank">Links</a></div>
</td>
<td class="thead" align="center">$links[count]</td></tr>
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validateposts" target="_blank">Link Posts</a></div>
</td>
<td class="thead" align="center">$linkposts[count]</td></tr>
</table>
		
		</td>
	</tr>
</tbody>
</table>
<br />

<!-- End Quick Moderation Block -->
Reply With Quote
  #11  
Old 08-11-2004, 09:13 PM
pdatotaal pdatotaal is offline
Rollercoaster junkie
 
Join Date: Jan 2004
Location: Holland (temp Canada)
Posts: 78
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Thanks, installed! looks very nice... so far not Link Posts and Join Requests used.. So later will be maybe nice..

Thanks again for sharing!
Reply With Quote
  #12  
Old 12-09-2004, 05:18 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Shon, very nice! The only change I did was to change the hard-coded width of "187" to be "100%" instead so that it behaves like the rest of my modules.

Thanks.
Reply With Quote
  #13  
Old 02-01-2005, 05:11 PM
Polo's Avatar
Polo Polo is offline
Senior Member
 
Join Date: Jun 2004
Posts: 823
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

nice thanks Brian
__________________
God180.com <---------------------My heavily modified vBulletin board
Reply With Quote
  #14  
Old 04-03-2005, 10:06 PM
cmiller1014 cmiller1014 is offline
Member
 
Join Date: May 2004
Posts: 97
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

My quick moderation always shows 1 post needs to be moderated, but there are none. Any ideas?
Reply With Quote
  #15  
Old 04-03-2005, 10:09 PM
cmiller1014 cmiller1014 is offline
Member
 
Join Date: May 2004
Posts: 97
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Shon,

I used your template and its great! What should I add to moderate.php so that it pulls the number of link posts too? Right now it shows no number there, not even 0.

Thanks!

Quote:
Originally Posted by Shon
Well, since then I've added Link Posts and Join Requests... I took the join requests part of it out and left the link posts HTML, if you want to you can take it out or I may post the code for it later if nobody releases it or has released it yet....

Template: adv_portal_moderation
Code:
<!-- Quick Moderation Block -->

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="187">
<thead>
	<tr>
		<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('moderate')"><img id="collapseimg_moderate" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_moderate.gif" alt="" border="0" /></a>
<span class="smallfont"><strong>$vba_options[portal_blockbullet] $vbphrase[quick_moderation]</strong></span></td>
	</tr>
<thead>
<tbody id="collapseobj_moderate" style="$collapseobj_moderate">
	<tr>
		<td class="$getbgrow">
<table border="0" cellpadding="3" cellspacing="1" class="tborder" width="100%">
	
			<if condition="$show['threads']">
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=posts">Threads</div>
</td>
<td class="thead" align="center">$threads[count]</td></tr>
			</if>
			<if condition="$show['posts']">
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=posts#postlist">Posts</div>
</td>
<td class="thead" align="center">$posts[count]</td></tr>
			</if>
			<if condition="$show['events']">
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=events">Events</div>
</td>
<td class="thead" align="center">$events[count]</td></tr>
			</if>
			<if condition="$show['attachments']">
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/moderate.php?do=attachments">Attachments</div>
</td>
<td class="thead" align="center">$attachments[count]</td></tr>
			</if>
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$admincpdir/user.php?do=moderate">Users</a></div>
</td>
<td class="thead" align="center">$users[count]</td></tr>
<tr><td class="alt2" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validate" target="_blank">Links</a></div>
</td>
<td class="thead" align="center">$links[count]</td></tr>
<tr><td class="alt1" width="80%">
				<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validateposts" target="_blank">Link Posts</a></div>
</td>
<td class="thead" align="center">$linkposts[count]</td></tr>
</table>
		
		</td>
	</tr>
</tbody>
</table>
<br />

<!-- End Quick Moderation Block -->
Reply With Quote
  #16  
Old 09-19-2005, 09:33 PM
Gary Bolton's Avatar
Gary Bolton Gary Bolton is offline
Senior Member
 
Join Date: Jan 2005
Posts: 225
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

For cmps 2 this needs to be changed in Brians first post

Change:

Code:
<div><a href="$vboptions[bburl]/$modcpdir/links.php?do=validate" target="_blank">Links</a> ($links[count])</div>
To:

Code:
<div><a href="$vboptions[bburl]/$modcpdir/vba_links.php?do=validate" target="_blank">Links</a> ($links[count])</div>

---------------------------

PS: Brian, using the same method, what database entry would I have to add to also display Gallery images that need moderating as well? All I need to know is the database code to add to modules/moderate.php
__________________
MRGTB.com

Last edited by Gary Bolton; 09-19-2005 at 11:22 PM.
Reply With Quote
  #17  
Old 02-25-2006, 03:43 AM
geoff's Avatar
geoff geoff is offline
Cannabalistic Lemur
 
Join Date: Sep 2005
Location: Oklahoma
Posts: 162
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

I know Im bringing up an old post but it fit...

I tried to add the line to my moderate.php within the modules fodler and got an error

is the new line still that since links has changed?
Reply With Quote
  #18  
Old 03-12-2006, 03:38 PM
WarriorFX WarriorFX is offline
Junior Member
 
Join Date: Sep 2005
Posts: 10
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Quote:
Originally Posted by geoff
I know Im bringing up an old post but it fit...

I tried to add the line to my moderate.php within the modules fodler and got an error

is the new line still that since links has changed?
Try this instead (vb3.5.x w/vBadv CMPS 2.1)...
Code:
	$links = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "links WHERE valid = 0");
Reply With Quote
  #19  
Old 03-12-2006, 03:56 PM
geoff's Avatar
geoff geoff is offline
Cannabalistic Lemur
 
Join Date: Sep 2005
Location: Oklahoma
Posts: 162
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

hell ya!!

that worked out

got one for Gallery by chance?
Reply With Quote
  #20  
Old 03-12-2006, 04:11 PM
WarriorFX WarriorFX is offline
Junior Member
 
Join Date: Sep 2005
Posts: 10
Default Re: Add Links Awaiting Moderation to Your vBa CMPS Quick Moderation Moudle

Quote:
Originally Posted by geoff
hell ya!!

that worked out

got one for Gallery by chance?
I don't know of the Gallery module but make sure your references to "$DB_site->" are "$db->" for vB3.5.x
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Moderation Module Kirby Feedback & Suggestions 0 01-16-2008 03:48 AM
Adding Links Awaiting Moderation to vBa CMPS Quick Mod Module adwade Modifications (version 3.x & 2.x) 2 09-21-2006 12:25 AM
Quick Moderation links have extra / eclectica Troubleshooting & Problems 2 02-09-2006 04:08 PM
'Active Users' links are 404. Also, 'Quick Moderation' not working. Turboface Troubleshooting / "How do I..." Questions 2 11-28-2004 11:55 PM
quick moderation module not showing members awaiting moderation Mont Bugs & Other Issues 6 08-05-2004 09:45 AM


All times are GMT -4. The time now is 12:40 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.