You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 69 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - HTML in block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 5:57 am Reply with quoteBack to top

How do I use HTML code in a block? I'm using PHP-Nuke 6.5.
Find all posts by philsmithcloverView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat Jun 28, 2003 6:16 am Reply with quoteBack to top

Read the BLOCKS instruction file in your nuke distribution for explanation.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 7:25 am Reply with quoteBack to top

Thanks, but when I do that, here's what shows up on my site
Quote:


Parse error: parse error, unexpected T_STRING in /var/www/clawz.com/philcloverweb/philcloverweb.clawz.com/nuke/blocks/block-Counter.php on line 20

Here's the code:
Code:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

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

$content = "<script language="JavaScript1.2" type="text/javascript" src="http://pub24.bravenet.com/counter/code.php?id=357484&usernum=2020326584&groupnum=24&cpv=1"> </script>
<noscript>
<a href="http://counter24.bravenet.com/index.php?id=357484&usernum=2020326584&cpv=1"
target="_top"><img src="http://counter24.bravenet.com/counter.php?id=357484&usernum=2020326584"
alt="Bravenet.com" border="0" /></a>
</noscript>";

?>

The filename is block-Counter.php. How can I fix this problem?


Last edited by philsmithclover on Sat Jun 28, 2003 7:31 am; edited 1 time in total
Find all posts by philsmithcloverView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat Jun 28, 2003 7:27 am Reply with quoteBack to top

You have placed JS code in the middle of PHP code, plus you did not assign the code to the $contents variable. Look at the blocks/block-Sample_Block.php file. A simple way to introduce html/js code into PHP can be found in this link. Don't worry about reading all the discussion in the thread, all were fixed by following my original instructions to the letter. http://nukecops.com/postt2548.html

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 7:34 am Reply with quoteBack to top

So, would the file look like this?
Code:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

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

$content = <<<_JSCODE_
<script language="JavaScript1.2" type="text/javascript" src="http://pub24.bravenet.com/counter/code.php?id=357484&usernum=2020326584&groupnum=24&cpv=1"> </script>
<noscript>
<a href="http://counter24.bravenet.com/index.php?id=357484&usernum=2020326584&cpv=1"
target="_top"><img src="http://counter24.bravenet.com/counter.php?id=357484&usernum=2020326584"
alt="Bravenet.com" border="0" /></a>
</noscript>
_JSCODE

?>
Find all posts by philsmithcloverView user's profileSend private message
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 7:36 am Reply with quoteBack to top

BTW, my site is http://philcloverweb.clawz.com .
Find all posts by philsmithcloverView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat Jun 28, 2003 7:39 am Reply with quoteBack to top

No, you're missing a few things.
Code:
$content = <<<_JSCODE_
<script language="JavaScript1.2" type="text/javascript" src="http://pub24.bravenet.com/counter/code.php?id=357484&usernum=2020326584&groupnum=24&cpv=1"> </script>
<noscript>
<a href="http://counter24.bravenet.com/index.php?id=357484&usernum=2020326584&cpv=1"
target="_top"><img src="http://counter24.bravenet.com/counter.php?id=357484&usernum=2020326584"
alt="Bravenet.com" border="0" /></a>
</noscript>
_JSCODE_;
Then, you have assigned a PHP variable $messageText but you don't reference it anywhere. I suggest you get a book on beginning PHP and MySQL (you'll need it soon, I'm sure Wink). Also consult the PHP on-line documentation at php.net.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 7:44 am Reply with quoteBack to top

I plan on learning PHP and MySQL soon. It is pretty useful.
Find all posts by philsmithcloverView user's profileSend private message
philsmithclover
Nuke Cadet
Nuke Cadet


Joined: Jun 28, 2003
Posts: 6


PostPosted: Sat Jun 28, 2003 7:49 am Reply with quoteBack to top

Thank you so much!!! It works!!!
Find all posts by philsmithcloverView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.275 Seconds - 301 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::