Author |
Message |
zacklk
Regular


Joined: Mar 06, 2010
Posts: 79
|
Posted:
Fri May 07, 2010 5:01 am |
|
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&file=article&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&file=article&sid=$sid', 290, 55);
</script>
<script type="text/javascript" language="javascript">
showInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules.php?name=News&file=article&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
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&file=article&sid=$sid', 290, 55);"
. "/script>"
. "<script type=\"text/javascript\" language=\"javascript\">"
. "howInitialOdiogoReadNowFrame (_odiogo_feed_id, 'modules.php?name=News&file=article&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. |
|
|
|
 |
nuken
RavenNuke(tm) Development Team

Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Fri May 07, 2010 9:34 am |
|
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&file=article&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&file=article&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&file=article&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. |
_________________ Only registered users can see links on this board! Get registered or login!
Last edited by nuken on Fri May 07, 2010 3:04 pm; edited 1 time in total |
|
|
 |
zacklk

|
Posted:
Fri May 07, 2010 11:19 am |
|
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

|
Posted:
Fri May 07, 2010 11:26 am |
|
This would only show up on the front page of the news, not the article page. |
|
|
|
 |
nuken

|
Posted:
Fri May 07, 2010 11:35 am |
|
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&file=article&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&file=article&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

|
Posted:
Fri May 07, 2010 11:54 am |
|
cool it works great. thank a lot nuken. |
|
|
|
 |
|