vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Second DB on single Page (https://vborg.vbsupport.ru/showthread.php?t=160226)

req2d 10-14-2007 05:32 PM

Second DB on single Page
 
I am in the process of learning & writing a mod that will essentially show thumbnails for spotlight threads. To keep things simple, I'm not linking it into vb per say, so my staff will have an external admin page where they will be able to upload and save spotlight thread entries ( seperate DB). This will then show the latest x spotlight thumbnails on forumhome.

Is it ok to have 2 db connections and if so, do I just save display/query part of this mod in a plugin within vb?

Many thanks for any help you can provide :)

Cheers

sabret00the 10-14-2007 05:35 PM

sounds to me like you're over complicating things to be honest. it really doesn't matter if it's the same DB or even if it's done through deep vBulletin integration. you could do the above via the vBulletin engine by creating a usergroup permission check on the newly designed admin page and do it like that. it'll probably be more efficient too.

req2d 10-14-2007 05:37 PM

Thank you Sabe,

Would this also work even if my staff do not have admin access (they're just mods)?

sabret00the 10-14-2007 05:55 PM

Yep, if you look into the article section. there's a thread on usergroup permissions. check that out.

Basically in the same way you enable your mods the ability the move posts, you'd have something "Can access news portal" and voila. It seems hard at first glance, but bare with it. it'll make things so much easier.

req2d 10-14-2007 06:01 PM

Thank you for your advice, will definitely look into it.

--------------- Added [DATE]1192389686[/DATE] at [TIME]1192389686[/TIME] ---------------

Given that I have a table created within the vb db, would this show the latest 6 images in a row? Sorry if the question is rather novice, all new to me. Many thanks :)

PHP Code:

$highlightthreads $db->query_read("SELECT * FROM " TABLE_PREFIX "highlightthread ORDER BY id DESC LIMIT 0, 6); 

while (
$row = mysql_fetch_array($highlightthreads)) {
    echo "
<img src=".$row["image"]." />";
    } 


sabret00the 10-14-2007 09:11 PM

it looks right.


All times are GMT. The time now is 04:07 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.00952 seconds
  • Memory Usage 1,722KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete