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, 68 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 - How to turn a php script into a 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
chadrt
Nuke Soldier
Nuke Soldier


Joined: Oct 03, 2005
Posts: 21


PostPosted: Wed Feb 07, 2007 10:24 pm Reply with quoteBack to top

I have tried to turn this into a block and I keep getting a complete mess of information. Or I get the results that I want completely above the block it is very weird. Thanks a bunch.

Code:

<?php
//The line below will actually point to an external source but I
//have put a copy of the file it will be parsing in this location for testing.
$lines = file ('http://myrecoveryna.org/nickplus.txt');
$count = count($lines);

echo ""
foreach ($lines as $line_num => $line) {
    echo  ($line)  . "<br>\n";
}
echo "<br><b>";

if ($count == 1)
{
   echo  "Total:<br>".$count." user chatting!";
}
else{
   echo  "Total:<br>".$count." users chatting!</b>";
}
?>


Eventually I would even like to see the OP characters that are in the text file be parsed out and replaced with corresponding icons like a Speaker instead of + sign for Voiced users, a cops badge instead of @ for Channel Operators, etc. But that is the least of my worries right now. If someone could figure out how to make it show in a Block that would be wonderful.

If anyone know how to do the parse for the replacement of images I would be willing to pay for their time, just let me know if you can do it and what it would cost.

Sincerely,
Chad T.
Find all posts by chadrtView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12383


PostPosted: Wed Feb 07, 2007 11:55 pm Reply with quoteBack to top

Start here:
http://www.nukecops.com/PHP-Nuke_blocks.html
Creating Blocks

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
chadrt
Nuke Soldier
Nuke Soldier


Joined: Oct 03, 2005
Posts: 21


PostPosted: Thu Feb 08, 2007 8:39 am Reply with quoteBack to top

I have to admit that when I first looked at what you said this morning I was a little ticked but now that I think about it a little more, if I am not willing to atleast try and solve the problem myself I am not acomplishing anything in life really. I would just be letting everyone else do it for me.

Using the information found on that page I was not only able to make new block with the information I wanted but I was add the information to the existing login block for the chat room module. So I accomplished more out of reading and understanding than just letting someone tell me the code for me to copy into my page. Thank you for your help!!!
Find all posts by chadrtView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12383


PostPosted: Thu Feb 08, 2007 8:35 pm Reply with quoteBack to top

Hey, I appreciate it. I know I generally give the most sparse response... but it is for a reason.

Your last statement is absolutely correct. You learn by doing.

We'll be here to answer questions when you get stuck or need to be pointed to a proper path Smile

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
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.326 Seconds - 294 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::