Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 10-14-2007, 05:32 PM
req2d req2d is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 10-14-2007, 05:35 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 10-14-2007, 05:37 PM
req2d req2d is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Sabe,

Would this also work even if my staff do not have admin access (they're just mods)?
Reply With Quote
  #4  
Old 10-14-2007, 05:55 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 10-14-2007, 06:01 PM
req2d req2d is offline
 
Join Date: Jul 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"]." />";
    } 
Reply With Quote
  #6  
Old 10-14-2007, 09:11 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it looks right.
Reply With Quote
Reply

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


All times are GMT. The time now is 12:14 PM.


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.03892 seconds
  • Memory Usage 2,203KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete