PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
sek-sports
Hangin' Around


Joined: Jul 18, 2007
Posts: 49

PostPosted: Tue Dec 16, 2008 4:14 pm Reply with quote Back to top

Can someone help me with a block I am attempting to make? I am wanting it as a center block but everytime I activate it, it jacks my main page all up.

Here is what I have concocted Laughing
Code:
<?php

if (eregi("block-maxpreps.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

<script type="text/javascript" src="http://widgets.maxpreps.com/includes/js/widget/teams.js" >
</script>
<script type="text/javascript" >
<!--
    ShowTeamsWidget('29190e90-bccb-dd11-9246-001cc494dda6');
//-->
</script>

?>
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3028
Location: United Kingdom

PostPosted: Tue Dec 16, 2008 4:19 pm Reply with quote Back to top

Unfortunately you can't just paste in HTML like that. There are a number of ways of doing it and if you do a search here you should find the answer.
View user's profile Send private message
sek-sports
Hangin' Around


Joined: Jul 18, 2007
Posts: 49

PostPosted: Tue Dec 16, 2008 4:36 pm Reply with quote Back to top

Ok can you tell me where I went wrong with it this time?

Code:

<?php

if (eregi("block-maxpreps.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$content  .=  "<script type=\"text/javascript\" src=\"http://widgets.maxpreps.com/includes/js/widget/teams.js\" >";
$content  .= "</script>";
$content  .= "<script type=\"text/javascript\" >";
$content  .= "<!--";
$content  .= "    ShowTeamsWidget('29190e90-bccb-dd11-9246-001cc494dda6');";
$content  .= "//-->";
$content  .= "</script>";
$content  .= "

?>
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2404
Location: Pennsylvania

PostPosted: Tue Dec 16, 2008 7:31 pm Reply with quote Back to top

The last line needs to be
Code:
$content  .= "";
View user's profile Send private message Visit poster's website
sek-sports
Hangin' Around


Joined: Jul 18, 2007
Posts: 49

PostPosted: Tue Dec 16, 2008 8:23 pm Reply with quote Back to top

thanks, now at least the box shows up but no content.
View user's profile Send private message
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Thu Dec 18, 2008 6:30 am Reply with quote Back to top

I would also either make your first $content just be

$content = "....

or, you should add a line above your first $content line to initialize $content to be empty:

$content = "";

Now, this has nothing to do with your block not having content. You might want to throw in a JavaScript alert function in there just to see if your block is working properly or a document.write
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Thu Dec 18, 2008 9:35 am Reply with quote Back to top

I would also view the page source in your browser to make sure the javascript is making it to the page.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Sat Dec 20, 2008 1:03 am Reply with quote Back to top

Actually I would recode your block like this. It works perfectly for me Smile

Code:
<?php
if (eregi('block-maxpreps.php',$PHP_SELF)) {
    Header('Location: index.php');
    die();
}
$content   = '';
$content  .= '<script type="text/javascript" src="http://widgets.maxpreps.com/includes/js/widget/teams.js">';
$content  .= '</script>';
$content  .= '<script type="text/javascript">';
$content  .= 'ShowTeamsWidget("29190e90-bccb-dd11-9246-001cc494dda6");';
$content  .= '</script>';
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Tue Dec 23, 2008 4:35 pm Reply with quote Back to top

Yeah, what he says... Laughing
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum