Tricked Out News

Welcome to TON. This site is dedicated to development of addons for the RavenNuke™ CMS
Follow Us:
Tricked Out Mods: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to add Odiogo.com Text to Voice to News
 
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke
View previous topic :: View next topic  
Author Message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Fri May 07, 2010 11:22 am 
Post subject: How to add Odiogo.com Text to Voice to News
Reply with quote

This is assuming you are using RavenNuke 2.40.01 and you have the Odiogo blog url set to your news rss feed. You will need to change Your_Feed_ID_Here to your Odiogo Feed ID number you receive in the welcome email.

Go to http://widget.odiogo.com and enter your News rss feed url and email address. Follow the directions. When you receive the welcome email, get your unique Odiogo Feed ID number and replace Your_Feed_ID_Here with that number in the following code

Create a file in includes/addons named head-odiogo.php and place the following code in it

Code:
<?php

echo '<script type="text/javascript" language="javascript" src="http://widget.odiogo.com/odiogo_js.php?feed_id=Your_Feed_ID_Here"></script>';
?>


Open modules/News/Index.php and on around line 148 find:
Code:
$story_link = '<a href="modules.  php?name=News&amp;file=article&amp;sid=' . $sid . '">';


After add: (You will need to remove the space between modules. php in the code below in two places. My ShortLinks is rewriting the links if I do not insert the spaces.)
Code:
$audiotop = "<BEGIN>\n"; 

$audiotop .= "<script>\n";
$audiotop .= "showOdiogoReadNowButton (_odiogo_feed_id, '$title', 'modules. php?name=News&amp;file=article&amp;sid=$sid',\n";
$audiotop .= "290, 55);\n";
$audiotop .= "</script>\n";
$audiotop .= "<END>\n";
$audiotop .= "\n";
$audiobottom = "<BEGIN>\n";
$audiobottom .= "<script>\n";
$audiobottom .= "showInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules. php?name=News&amp;file=article&amp;sid=$sid', 290, 0);\n";
$audiobottom .= "</script>\n";
$audiobottom .= "<END>\n";
$hometext = $audiotop . $hometext . $audiobottom;



If you want it on the articles page, open modules/News/articles.php and find around line 110:

Code:
if (empty($bodytext)) {

   $bodytext = $hometext;
} else {
   $bodytext = $hometext . '<br /><br />' . $bodytext;
}


Change it to:(You will need to remove the space between modules. php in the code below in two places. My ShortLinks is rewriting the links if I do not insert the spaces.)
Code:
$audiotop = "<!-- BEGIN listen now odiogo.com #2 -->\n";

$audiotop .= "<script type=\"text/javascript\" language=\"javascript\">\n";
$audiotop .= "showOdiogoReadNowButton (_odiogo_feed_id, '$title', 'modules. php?name=News&amp;file=article&amp;sid=$sid',\n";
$audiotop .= "290, 55);\n";
$audiotop .= "</script>\n";
$audiotop .= "<!-- END listen now odiogo.com #2 -->\n";
$audiotop .= "\n";
$audiobottom = "<!-- BEGIN listen now odiogo.com #3 -->\n";
$audiobottom .= "<script type=\"text/javascript\" language=\"javascript\">\n";
$audiobottom .= "showInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules. php?name=News&amp;file=article&amp;sid=$sid', 290, 0);\n";
$audiobottom .= "</script>\n";
$audiobottom .= "<!-- END listen now odiogo.com #3 -->\n";


if(empty($bodytext)) {
$bodytext = $audiotop . $hometext . $audiobottom;
} else {
  $bodytext = $audiotop . $hometext . $bodytext . $audiobottom;
}


This will automatically add the listen now to all your news articles.
Make sure you back your news index up before you do this just in case something goes wrong.
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke All times are GMT - 5 Hours
 
 Page 1 of 1

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©