Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Random Glossary Term [vBa CMPS module] Details »»
Random Glossary Term [vBa CMPS module]
Version: 1.0.1, by RS_Jelle RS_Jelle is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 03-31-2006 Last Update: 04-19-2006 Installs: 26
Template Edits
Additional Files  
No support by the author.

This vBadvanced CMPS module displays a random term of Mindestic GlosPro.

I tested it on vBulletin 3.5.4 with vBadvanced CMPS 2.1.0 and vBGlossary Basics 1.1.0.

It adds one query to a vBa page and it's fully phrased and 100% W3C XHTML 1.0 compliant.



================================================== ========================
Installation
================================================== ========================
  • Upload all files from the "upload" directory into your forum directory.
  • Create a new template called "adv_portal_glossary_random_term" with the following content:

    HTML Code:
    <tr>
    	<td class="alt1">
    		<div align="center">
    			<a href="$vboptions[bburl]/glossary.php?$session[sessionurl]do=viewglossary&amp;term=$glossary_module_term_id"><img src="$vboptions[bburl]/images/question-mark.gif" border="0" alt="$vbphrase[glossary]" title="$glossary_module_term_name" /></a>
    			<br /><a href="$vboptions[bburl]/glossary.php?$session[sessionurl]do=viewglossary&amp;term=$glossary_module_term_id"><strong>$glossary_module_term_name</strong></a>
    		</div>
    	</td>
    </tr>
    <tr>
    	<td class="alt2">
    		<div align="center">
    			<span class="smallfont"><a href="$vboptions[bburl]/glossary.php?$session[sessionurl]">[$vbphrase[glossary]]</a></span>
    		</div>
    	</td>
    </tr>
  • Create a new vBa CMPS PHP file module (AdminCP => vBa CMPS => Add Module => [PHP File]) with the following info:
    - Title: Random Term (or choose another one)
    - File to Include: glossary_random_term.php
    - Identifier: glossaryrandomterm (or choose another one)
    - Templates Used: adv_portal_glossary_random_term

================================================== ========================
Requirements
================================================== ========================
  • vBulletin 3.5.x or 3.6.x
  • vBadvanced CMPS
  • vBGlossary Basics (now called Mindestic GlosPro)

================================================== ========================
History
================================================== ========================
- 1.0.0: Initial release
- 1.0.1: Fixed a little bug

The question mark graphic is made by Norke (Yannick De Smet).

If you use this add-on, please click install to say thanks and to receive updates.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 11-08-2006, 05:59 PM
jaks jaks is offline
 
Join Date: Dec 2004
Location: Toronto
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank Neutral Singh and RS_Jelle not me for this.

Modified Module to include description:
PHP Code:
<?php

if (($permissions['glossarypermissions'] & $vbulletin->bf_ugp_glossarypermissions['canviewglossary']) AND $vbulletin->options['vbglossaryactive'])
{
    
$glossary_module_content '';

    
$glossary_content_query $db->query_read("SELECT glossaryid, glossaryname, glossarydescription
                        FROM " 
TABLE_PREFIX "glossary
                        WHERE glossaryvalid = 1
                        ORDER BY RAND()
                        LIMIT 1
    "
);

    
$glossary_content_fetcharray $db->fetch_array($glossary_content_query);

    
$glossary_module_term_id $glossary_content_fetcharray['glossaryid'];
    
$glossary_module_term_name $glossary_content_fetcharray['glossaryname'];
$glossary_module_description strip_bbcode($glossary_content_fetcharray['glossarydescription'], falsefalsefalse);  
$glossary_module_description substr($glossary_module_description,0,150);


    
$db->free_result($glossary_content_query);
}

eval(
'$home[$mods[\'modid\']][\'content\'] .= "' fetch_template('adv_portal_glossary_random_term') . '";');

?>
Add this where you want it to show in your adv_portal_glossary_random_term template:
PHP Code:
$glossary_module_description 
Enjoy
Reply With Quote
  #13  
Old 08-12-2007, 09:36 PM
MDK-Indy MDK-Indy is offline
 
Join Date: Mar 2007
Location: Germany
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine with vBulletin 3.6.7 PL1, vBadvanced CMPS 3.0 RC1 and Mindestic GlosPro 1.2.2

greeting Indy
Reply With Quote
  #14  
Old 04-29-2008, 08:37 PM
chick's Avatar
chick chick is offline
 
Join Date: Aug 2006
Location: PI Land
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb 3.6.8 with mindestic gloss.

Maybe a little help.

I managed to get it working on cmps but the.... ? image goes to a blank page /glossary.php?do=viewglossary&term=

though the [glossary] link does go to the correct page, the question mark goes to a blank page. Do I have something that needs changing in the code.

I had to turn it off for now.
Reply With Quote
Reply

Thread Tools

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 01:34 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.03805 seconds
  • Memory Usage 2,245KB
  • Queries Executed 18 (?)
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)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete