Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 01-17-2005, 06:53 PM
Murphinator Murphinator is offline
 
Join Date: Dec 2004
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default featured member forum

ive been trying to learn php to do this:

what i want to do is have a featured member forum, i dont know any 3rd party or how the cron files work so can someone make a moderation for this, what i want to have done is the featured member forum change at midnight to a different member forum. any ideas?
Reply With Quote
  #2  
Old 01-17-2005, 08:31 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

explain more what you want please.
Reply With Quote
  #3  
Old 01-17-2005, 08:57 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
explain more what you want please.
I second that
Reply With Quote
  #4  
Old 01-17-2005, 09:53 PM
Murphinator Murphinator is offline
 
Join Date: Dec 2004
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

umm ok, here it goes,

what im going to do is im going to make forums for members that request them, these forums will be theres to post thoughts about life and other things in there lifes, kind of like diaries...
now with the featured thing, i want a random diary to be picked everyday and be show with the title and description, so its featured
Reply With Quote
  #5  
Old 01-17-2005, 10:04 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For diaries i'd suggest one of the journal hacks.
Reply With Quote
  #6  
Old 01-17-2005, 10:28 PM
Murphinator Murphinator is offline
 
Join Date: Dec 2004
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah but i want forums. i really good example is http://forums.govteen.com
Reply With Quote
  #7  
Old 01-18-2005, 02:22 AM
Murphinator Murphinator is offline
 
Join Date: Dec 2004
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone, i really need this, so please help
Reply With Quote
  #8  
Old 01-18-2005, 02:43 PM
Murphinator Murphinator is offline
 
Join Date: Dec 2004
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok then someone please tell me how
Reply With Quote
  #9  
Old 03-07-2005, 03:47 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, Please test this good first:

1. Create a new Forum on the place you want to featured forum to show up.
2. Enter a Title and if wanted a description
3. Set a display order
4. LEAVE THE REST EMPTY!!!! (or put a link to a forum in "Forum Link")

now save the following into a new file in your includes/cron directory:
PHP Code:
<?php

// Sample featured forum cron script by MarcoH64

error_reporting(E_ALL & ~E_NOTICE);

if (!
is_object($DB_site))
{
    exit;
}

// Define the featured forum link, insert forumid
$featuredforumlink 6;
// Fill array with forumids to choose from
$chooseforums = array(2,4,5);

// No more changes needed under this

// Select random forum
$selected $DB_site->query_first("SELECT forumid from " TABLE_PREFIX "forum
            WHERE forumid IN (" 
implode(",",$chooseforums) . ")
            ORDER BY RAND()
            LIMIT 1
            "
);

// Update forum info
$DB_site->query("UPDATE " TABLE_PREFIX "forum
            SET link = '
$vboptions[bburl]/forumdisplay.php?f=$selected[forumid]'
            WHERE forumid = 
$featuredforumlink
            "
);

require_once(
'./global.php');
            
build_forum_permissions();


log_cron_action("Featured Forum Updated. New featured forum: $selected[forumid]"$nextitem);

?>
Edit the $featuredforumlink and the $chooseforums var's.

Setup the new cronjob with a schedule you want. All should go auto now.

PS This is an example on how you could do it, change for your needs.
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 02:16 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.17483 seconds
  • Memory Usage 2,242KB
  • 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)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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