insert indicator?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   insert indicator?
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
I would like to upload an icq status block to my site. The readme tells me that i need to insert an indicator.

It says:
5. Inserting the indicator

You can insert it in your page using ssi, javascript or php include. Below are some examples:


php include:
<?php include "icq.php"; ?>

php url include:
<?php include "http://yourserver/icq.php"; ?>

---------------------------------------------------------------------------------

How would i use the php include? Where do i put this information? Running NUKE 6.8.



Back to top Reply with quote
#2   
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
   
Since the block your making is php just add that at the top like so

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


If you get an error then you may have to switch it from

include "icq.php";

To

include ("icq.php");

Or

require_once ("icq.php");



_________________
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   
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
where exactly does this go? in the content section of the new block?



Back to top Reply with quote
#4   
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
   
It will go right under the top opening of the block before the content . Look at the example i posted that is the start of a block.




_________________
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   
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
Do i open the block with a text editor and put that info in it at the top?



Back to top Reply with quote
#6   
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
open it with notepad and as Telli's example shows, place it just at the start
before the content


taut



Back to top Reply with quote
#7   
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
Thanks! That was an amazingly quick response! I will give it a shot.



Back to top Reply with quote
#8   
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
I put the code in at the top of the block before the first if statement and saved it uploaded and when i pull down the filename i see: None, Advertising, Content, Encyclopedia, Ephemerids, Forums, Last 5 Articles, Last Referers, Reviews, Sample Block, Top 10 Downloads, Top 10 Links, Total Hits, fiblack3d-Forums. What did I do wrong? How can i show u what I have?

Also, I tried all three ways



Back to top Reply with quote
#9   
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
   
Just paste your block in here i will show you where it goes.




_________________
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
#10   
Recoil
CZ Addict
Recoil has been a member for over 20 year's 20 Year Member
usa.gif louisiana.gif
Occupation: Manager
Gender: Male
Fav. Sports Team: New Orleans
Website:
Status: Offline
Joined: Jan 17, 2004
0.06 posts per day
Posts: 427
Points: 8,650
   ICQ Number
I put the code u gave me where i thought i should by moving the 1st if statement down. I think i should have

<?php

/**************************************************
* ICQ Status - Single User
* Version ........ 1.4 (php)
* Created ........ 2003/11/15
* Author ......... Joao Orui
* E-mail ......... [ Register or login to view links on this board. ]
* WebPage ........ [ Register or login to view links on this board. ]
* Scripts ........ [ Register or login to view links on this board. ]
* UIN ............ 70140038
**************************************************/

/* configuration */
$online = "orange"; // online color
$offline = "brown"; // offline color
$unknown = "black"; // unknown color
$error = "red"; // error color
$textonline = "online"; // online text
$textoffline = "offline"; // offline text
$textunknown = "unknown"; // unknown text
$bold = 1; // display results in bold? (1=yes,0=no)
$linkwwp = 1; // link to wwp? (1=yes,0=no)
$wwpnewwindow = 1; // open wwp in a new window? (1=yes,0=no)
$uin = '70140038'; // your uin

/* do not edit anything from here if you do not know what you are doing */
if ( eregi( "block-icq.php", $PHP_SELF ) )
{
Header(" Location: index.php" );
die();
}
include "icq.php";

if($_SERVER["QUERY_STRING"] == 'js') {
header("Cache-Control: no-store");
header("Pragma: no-cache");
$js1 = "document.write('";
$js2 = "');";
}

if($bold) {
$b1 = "";
$b2 = "
";
}

if(!preg_match("/^([0-9]+)$/",$uin)) {
echo "$js1<font color=\"$error\">${b1}invalid uin$b2</font>$js2";
die;
}

$sock=@socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
$conn=@socket_connect($sock,'status.icq.com',80);
@socket_write($sock,"HEAD /online.gif?icq=$uin&img=5 HTTP/1.0\n\n");
while($res=@socket_read($sock,512,PHP_NORMAL_READ)) {
if (preg_match("/gif/i",$res)) { $status = $res; last; }
}


if($linkwwp) {
if ($wwpnewwindow)
$target = ' target="_blank"';
$linkwwp1 = "<a href=\"http://web.icq.com/wwp?Uin=$uin\"$target>";
$linkwwp2 = "</a>";
}
if(preg_match("/online1/",$status)) {
echo "$js1$linkwwp1<font color=\"$online\">$b1$textonline$b2</font>$linkwwp2$js2";
} elseif(preg_match("/online0/",$status)) {
echo "$js1$linkwwp1<font color=\"$offline\">$b1$textoffline$b2</font>$linkwwp2$js2";
} else {
echo "$js1$linkwwp1<font color=\"$unknown\">$b1$textunknown$b2</font>$linkwwp2$js2";
}

# Change Log
# 2003/11/15 1.4 - Joao Orui - js bug fix.. ' -> "
# 2003/11/15 1.4 - Joao Orui - php version
# 2003/11/09 1.3 - Joao Orui - spell check... :-)
# 2003/11/02 1.2 - Joao Orui - fixed bug in javascript output: ' -> "
# 2003/11/02 1.2 - Joao Orui - option to select between bold or not
# 2003/11/02 1.2 - Joao Orui - loop is now stopped when result is found
# 2003/11/02 1.2 - Joao Orui - output format to be compatible with ssi and php include
# 2003/11/02 1.2 - Joao Orui - split into single and multi user versions
# 2003/11/02 1.2 - Joao Orui - english version
# 2003/08/08 1.1 - Joao Orui - comentarios modificados
# 2003/08/08 1.1 - Joao Orui - opcao para configurar texto
# 2003/08/08 1.1 - Joao Orui - comando no http de get para head
# 2003/08/08 1.1 - Joao Orui - verifica uin
# 2003/08/08 1.1 - Joao Orui - adicionado link para o wwp
# 2003/08/08 1.1 - Joao Orui - nao requer mais o modulo cgi
# 2003/08/08 1.1 - Joao Orui - nao fica gravado no cache do browser
# 2003/08/08 1.1 - Joao Orui - novo caminho: /online.gif?icq=70140038&img=5
# 2003/08/08 1.1 - Joao Orui - novo servidor: status.icq.com
# 2003/01/31 1.0 - Joao Orui - versao inicial



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