The Arcive of vBulletin Modifications Site. |
|
Random Glossary Term [vBa CMPS module] Details »»
|
|||||||||||||||||||||||||
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 ================================================== ========================
================================================== ======================== Requirements ================================================== ========================
================================================== ======================== 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
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
this is way to quick addon release
|
|
#3
|
||||
|
||||
|
I had to change the adv_portal_glossary_random_term template to:
Code:
<tr> <td class="alt1"> <div align="center"> <a href="$vboptions[bburl]/glossary.php?$session[sessionurl]do=viewglossary&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&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> Oh, Thanks! |
|
#4
|
|||
|
|||
|
Thanks for reporting this issue, I fixed it
|
|
#5
|
|||
|
|||
|
any way to add a block like this to VBDrupal ?
|
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
||||
|
||||
|
Hi I was trying to add glossary description as well in the module. so i edited the module php file as follows:
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 = $glossary_content_fetcharray['glossarydescription'];
$db->free_result($glossary_content_query);
}
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_glossary_random_term') . '";');
?>
Just have a look at top right side at my website: http://www.sikhphilosophy.net Thanks |
|
#8
|
|||
|
|||
|
I'd love to have the description with the html being parsed aswell but I would need it limited to a certain number of words.:cross-eyed:
|
|
#9
|
|||
|
|||
|
@Neutral Singh: Instead of your extra code, use this:
PHP Code:
PHP Code:
To limit the number of characters, add this after the strip_bbcode line: PHP Code:
|
|
#10
|
|||
|
|||
|
Works perfect for us, thanks! It also helped me learn vBadvanced coding a little bit
![]() Megan http://www.sewingmamas.com/b/ |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|