Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
T-VBhoroscopes Addon -daily updated content Details »»
T-VBhoroscopes Addon -daily updated content
Version: 1.00, by lebanon lebanon is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.1 Rating:
Released: 09-23-2006 Last Update: Never Installs: 76
 
No support by the author.

This is a quick vb-horoscopes feature to add to your forum.
I just made this and tested it on my forum, working fine as shown demo below

Requirements:
php fopen on
ADDED : IF fopen is not ON on your webserver , download the second zip file called gethoroscopes.php and replace the one in your cron folder with this one that uses Curl instead of fopen.
Installation :
-Upload the files to their respective locations
-Install the product using the VBulletin product manager
Your done !

You can test your script directly by going to your scheduled task
and using "RUN NOW" you should see the script output and then you
can go check your page at http://urforum/dailyhoroscopes.php


License :
- Your are allowed to query our website using the cronjob once everyday
Leave on default installation and you will not be breaking any rule, or only change the HOUR and MINUTE of runtime.
- You can freely modify the template the way you wish, all you need is
to leave the $result reference where you want it for the script to function
I will also appreciate if you share us with your modified template !

- You are required to keep the copyright text in your template, however if
you prefer to remove it, you can only do that after contacting me and recieving permission to do so ( free of charge ofcourse )

DEMO
http://www.tchatting.com/forum/dailyhoroscopes.php
or choose a sign
http://www.tchatting.com/forum/daily...php?sign=aries

If you use this and wish to recieve support please click INSTALL

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-24-2006, 08:50 AM
Ajavas's Avatar
Ajavas Ajavas is offline
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Addon! Installed.

Would be nice in dutch to....
Reply With Quote
  #13  
Old 09-24-2006, 10:05 AM
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Location: Jerusalem
Posts: 571
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one
Reply With Quote
  #14  
Old 09-24-2006, 10:40 AM
project-Buckfas project-Buckfas is offline
 
Join Date: Jul 2006
Location: Ireland
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod. Installed, thanks
Reply With Quote
  #15  
Old 09-24-2006, 10:50 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow Thanks!
Reply With Quote
  #16  
Old 09-24-2006, 01:45 PM
joffer joffer is offline
 
Join Date: Sep 2006
Location: Bulgaria
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A little modified code of the cronjob that parses the horoscopes i made it so u can have a function gethoroscope(signname)
If u want u can replace your gethoroscopes.php with that and itll work fine.

PHP Code:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!
is_object($vbulletin->db))
{
    exit;
}
// ########################################################################
// ######################### START MAIN SCRIPT AND WRITE TO TXT ###########
// ########################################################################
$signs = array("aries","Taurus","gemini","cancer","leo","virgo","libra","scorpio","sagi","capricorn","aquarius","pisces");

function 
gethoroscope($sign) {
    
    
$url "http://www.tchatting.com/horoscopes/".$sign.".php";
@
$string implode(""file("$url"));
//$string = str_replace("\n","",$string);
$string trim($string);
$filename './dailyhoroscopes/'.$sign.'.txt';
// Let's make sure the file exists and is writable first.

if (is_writable($filename)) {
   if (!
$handle fopen($filename'w+')) {
         echo 
"Cannot open file ($filename)";
         exit;
   }

   
// Write $somecontent to our opened file.
   
if (fwrite($handle$string) === FALSE) {
       echo 
"Cannot write to file ($filename)";
       exit;
   }
   
   echo 
"Success, wrote ($string) to file ($filename)";
   
   
fclose($handle);

} else {
   echo 
"The file $filename is not writable";
}

}

for(
$i=0;$i<12;$i++) {
    
gethoroscope($signs[$i]);
}
?>
Reply With Quote
  #17  
Old 09-24-2006, 03:21 PM
warnmar10 warnmar10 is offline
 
Join Date: Nov 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to CHMOD all the text files in forums/dailyhoroscopes before it would work... which means I hit your server three times in one day before I figured it out.
Reply With Quote
  #18  
Old 09-24-2006, 04:29 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Spanish version?
Reply With Quote
  #19  
Old 09-24-2006, 06:50 PM
lebanon lebanon is offline
 
Join Date: Jan 2005
Location: Lebanon
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by warnmar10
I had to CHMOD all the text files in forums/dailyhoroscopes before it would work... which means I hit your server three times in one day before I figured it out.
Sorry i have not mentioned any chmoding , because by default webservers would accept php read/write commands owned by user to his own user directories unless further restrictions applied from your host such as in your case !
Ill add a note for that ! thank you for your note

As for translations , well , the feeds i recieve are in english, ill try to setup a translator using some service like google or bablefish maybe all i can think of now , because i dont imagine daily translation would be easy unless automatic,.
Reply With Quote
  #20  
Old 09-26-2006, 10:06 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lebanon
As for translations , well , the feeds i recieve are in english, ill try to setup a translator using some service like google or bablefish maybe all i can think of now , because i dont imagine daily translation would be easy unless automatic,.
So we would be fetching a feed from another feed? Is there a way so we can program this to fetch any FEED we want?

Thank you.
Reply With Quote
  #21  
Old 09-26-2006, 10:12 PM
kofoid kofoid is offline
 
Join Date: Dec 2005
Location: Colorado
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And the most famous question.... will this run on 3.5.4?
Reply With Quote
Reply


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 01:03 AM.


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.16178 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
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)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete