Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
zacklk
Regular
Regular



Joined: Mar 06, 2010
Posts: 79

PostPosted: Fri May 07, 2010 5:01 am Reply with quote

Hi,

Im trying to insert audiogo.com app in to my raven nuke news since a month now. if some can help tell me how to insert this java script to my raven nuke i really appreciate it.

1st Code
Code:
<script type="text/javascript"

language="javascript"src="http://widget.odiogo.com/odiogo_js.php?feed_id=feed_id"></script>


2nd Code

Code:
<!-- BEGIN listen now odiogo.com #2 --> 

<script type="text/javascript" language="javascript">
showOdiogoReadNowButton (_odiogo_feed_id, 'ARTICLE_TITLE', 'ARTICLE_ID',
290, 55);
</script>
<!-- END listen now odiogo.com #2 -->


3rd Code

Code:
<!-- BEGIN listen now odiogo.com #3 --> 

<script type="text/javascript" language="javascript">
showInitialOdiogoReadNowFrame (_odiogo_feed_id, 'ARTICLE_ID', 290, 0);
</script>
<!-- END listen now odiogo.com #3 -->


i need to replace the ARTICLE_TITLE with my news Article Title and ARTICLE_ID with my news Article ID. Floren from karakas-online told me to replace

ARTICLE_TITLE with $title and ARTICLE_ID with modules.php?name=News&amp;file=article&amp;sid=$sid

then i try to insert it in news like this

Code:
?> 

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

<script type="text/javascript" language="javascript">
showOdiogoReadNowButton (_odiogo_feed_id, '$title', 'modules.php?name=News&amp;file=article&amp;sid=$sid', 290, 55);
</script>

<script type="text/javascript" language="javascript">
showInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules.php?name=News&amp;file=article&amp;sid=$sid', 290, 0);
</script>
<?php


app did show up but it dose not get Article Title or Article id. so i thought its coz php code is braking from
Code:
<?php


so then i added it like this

Code:
echo"<script type=\"text/javascript\" language=\"javascript\"src=\"http://widget.odiogo.com/odiogo_js.php?feed_id=478687\"></script>" 

  . "<script type=\"text/javascript\" language=\"javascript\">"
  . "howOdiogoReadNowButton (_odiogo_feed_id, '$title', 'modules.php?name=News&amp;file=article&amp;sid=$sid', 290, 55);"
  . "/script>"
  . "<script type=\"text/javascript\" language=\"javascript\">"
  . "howInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules.php?name=News&amp;file=article&amp;sid=$sid', 290, 0);"
  . "/script>";


when i added like that nothing worked. even it did not load the page. i did found a person using this app in one of he's site nuke site. i did try to ask him but got no help. hope someone here can help me with this. thanks in advanced.
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Fri May 07, 2010 9:34 am Reply with quote

This is assuming you are using RavenNuke 2.40.01, your Odiogo Feed ID is 478687 and you have the Odiogo blog url set to your news rss feed.

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:
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";
$hometext = $audiotop . $hometext . $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.

_________________
Tricked Out News

Last edited by nuken on Fri May 07, 2010 3:04 pm; edited 1 time in total 
View user's profile Send private message Send e-mail Visit poster's website
zacklk







PostPosted: Fri May 07, 2010 11:19 am Reply with quote

thanks for the reply nuken. well i tried the way u told me nothing showed up. no errors no player. im using raven nuke 2.40.00. so i check the source by right clicking in the code. i can see the 1st code which is "echo "<!-- BEGIN listen now odiogo.com #1 -->\n"; " but 2nd and 3rd code not there in the page source. is it becouse of the raven nuke version or do i have to add something to article.php as well?
 
nuken







PostPosted: Fri May 07, 2010 11:26 am Reply with quote

This would only show up on the front page of the news, not the article page.
 
nuken







PostPosted: Fri May 07, 2010 11:35 am Reply with quote

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:
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;
}
 
zacklk







PostPosted: Fri May 07, 2010 11:54 am Reply with quote

cool it works great. thank a lot nuken.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©