Code problem

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Code problem
websolution
CZ Active Member
netherlands.gif
Occupation: security
Age: 47
Gender: Male
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 111
Points: 2,993
   
Question:

When i trie to insert this code into a block it works fine, but when i change "$sitename" into "web-solution" my whole webpage exept the left blocks doesnt load annymore.

what am i doing wrong??

<center>Link back to<Br><b>$sitename</b><Br><Br><a href=\"http://web-solution.nl/\" target=\"_blank\"><img border=0 src=\"images/CZlinks/solution_button.gif\" alt=\"Web-solution.nl\" width=95 height=31></a><p align=\"center\">    <textarea rows=\"3\" cols=\"14\"><a href=\"http://web-solution.nl/\" target=\"_blank\"><img src=\"http://www.web-solution.nl/images/CZlinks/solution_button.gif\" alt=\"web-solution.nl\" border=0 height=\"31\" width=\"88\"></textarea></center>


P.s.
I have substracted this piece of code from the CZ link back to us module.



_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#2   re: Code problem
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Are you putting the quotes around it? Dont forget the \ " before them if you are. Also are you making this block or trying to enter into the admin>blocks where you can put html in to make a block? I dont see why changing that would change anything. Doesnt the $sitename change to your sitename anyways?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
websolution
CZ Active Member
netherlands.gif
Occupation: security
Age: 47
Gender: Male
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 111
Points: 2,993
   
im trying to put the html inside the block. and the $sitename doesnt change to "web-solution"
But where do i put the \" , if that is nessecary.




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#4   re: Code problem
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Before the quotes.

Add this line at the top of your block

global $sitename;




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Code problem
websolution
CZ Active Member
netherlands.gif
Occupation: security
Age: 47
Gender: Male
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 111
Points: 2,993
   
global $sitename;
\"<center>Link back to<Br><b>$sitename</b><Br><Br><a href=\"http://web-solution.nl/\" target=\"_blank\"><img border=1 src=\"images/CZlinks/solution_button.gif\" alt=\"Web-solution.nl\" width=95 height=31></a><p align=\"center\">    <textarea rows=\"3\" cols=\"14\"><a href=\"http://web-solution.nl/\" target=\"_blank\"><img src=\"http://www.web-solution.nl/images/CZlinks/solution_button.gif\" alt=\"web-solution.nl\" border=0 height=\"31\" width=\"88\"></textarea></center>"


is this code oke?



_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#6   re: Code problem
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
<?php
/************************************************************************/
/* websolution Block                                                    */
/*                                                                      */
/* Copyright (c) 2002-2004 by websolution                               */
/* http://web-solution.nl                                               */
/*                                                                      */
/* 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-Link_Us.php", $PHP_SELF ) )
{
   Header(" Location: index.php" );
   die();
}
global $sitename;

$content .= "<center>Link back to<Br><b>$sitename</b><Br><Br><a href=\"http://web-solution.nl/\" target=\"_blank\"><img border=1 src=\"images/CZlinks/solution_button.gif\" alt=\"Web-solution.nl\" width=95 height=31></a><p align=\"center\">    <textarea rows=\"3\" cols=\"14\"><a href=\"http://web-solution.nl/\" target=\"_blank\"><img src=\"http://www.web-solution.nl/images/CZlinks/solution_button.gif\" alt=\"web-solution.nl\" border=0 height=\"31\" width=\"88\"></textarea></center><br>";
?>


Save as block-Link_Us.php

And congrats on your first block icon_biggrin.gif



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: Code problem
websolution
CZ Active Member
netherlands.gif
Occupation: security
Age: 47
Gender: Male
Website:
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 111
Points: 2,993
   
THNX eusa_dance.gif




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

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