vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Random Glossary Term [vBa CMPS module] (https://vborg.vbsupport.ru/showthread.php?t=111900)

jaks 11-08-2006 05:59 PM

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

MDK-Indy 08-12-2007 09:36 PM

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

greeting Indy

chick 04-29-2008 08:37 PM

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.


All times are GMT. The time now is 11:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01701 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete