vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - T-VBhoroscopes Addon -daily updated content (https://vborg.vbsupport.ru/showthread.php?t=127387)

Ajavas 09-24-2006 08:50 AM

:) Nice Addon! Installed.

Would be nice in dutch to....:rolleyes:

Barakat 09-24-2006 10:05 AM

nice one

project-Buckfas 09-24-2006 10:40 AM

Nice mod. Installed, thanks

Snake 09-24-2006 10:50 AM

Wow Thanks!

joffer 09-24-2006 01:45 PM

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]);
}
?>


warnmar10 09-24-2006 03:21 PM

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.

COBRAws 09-24-2006 04:29 PM

Spanish version?

lebanon 09-24-2006 06:50 PM

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,.

COBRAws 09-26-2006 10:06 PM

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.

kofoid 09-26-2006 10:12 PM

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


All times are GMT. The time now is 04:23 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.01445 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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