14, October 2008

Output formatting - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  PHP Whois script (Moderator: Olaf)
Topic: Output formatting
« previous next »
Pages: [1] Print

Author Topic: Output formatting  (Read 1147 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Apr 04, 2007, 04:00:44 PM »

I've noticed that the formatting for the output when you do "all info" seems to pretty much wrap everything on one line.  I checked the code and it seems to try to use nl2br() to convert new line characters into html breaks.  However, when viewing the output with either the nl2br() function or not, the output is the same.  I'm going to look into seeing if the data can be better formatted at the time of retrieval from the remote server when I get some free time, but I wanted some feedback incase this is only happening to me.

Whois Search page: http://www.betoglou.com/index.php?option=com_content&task=view&id=26&Itemid=79 Visit through proxy

I'm not sure if maybe Joomla might have something to do with it as well.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8124
41701 credits
Members referred : 3



« Reply #1 on: Apr 04, 2007, 09:32:29 PM »

Some template systems - like smarty for instance - are parsing the output. For example they can remove \n character.

Maybe that's the case with you too.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Apr 04, 2007, 09:54:10 PM »

I added a <br> when the code was getting retrieved.

whois_class.php changed a line in the get_domain_info() function from

Code:
$this->info .= $val;

to

Code:
$this->info .= $val."<br>";

This adds a break in the output when it gets displayed.  The only problem is, this data gets retrieved in an array, and the array breaks paragraphs at odd places some times, like in the middle of a sentence.

I'll see if I can scrub the array some more to throw in a check or two so it doesn't do that.

The normal behavior actually has it printing the information all on one line whether seen from Joomla via an IFRAME or directly accessing the script.  Adding the <br> in that location at least makes it easier to read.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6352
38936 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Apr 04, 2007, 10:05:39 PM »

you can place an extra enter into the code maybe that will help...


Last blog : Upload images for usage in TinyMCE
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6347
Tags : search results whois search nl2br() Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  PHP Whois script (Moderator: Olaf)
Topic: Output formatting
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct 14, 2008, 02:51:53 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!





Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.