Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 4th, 2007, 09:45 PM
FM 98.5 FM 98.5 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 24 FM 98.5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 4 m 9 sec
Reputation Power: 0
Using breaks in scripts

Can I get away without using <BR> in order to make a new row of writing in scripts? As I'm sending out instructions for someone to add a news article and to drop it directly into the source code. Only, they don't know much about scripts. I don't want to be telling them to be adding script as they go, such as <BR>. Is there a much easier way of getting round this? Is there something I can add somewhere else in the script so they don't have to do anything? If anyone can help me out, I would be very happy! Cheers.
This is what part of the scripting will look like when they have to write the news in:

<DIV ID="TXTOBJ7D7C35012C31C1" STYLE=" position:absolute; top:269px; left:213px; width:382px; height:34px; z-index:19;">
<DIV style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 10pt; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 1px; COLOR: #000000; FONT-FAMILY: Arial; BACKGROUND-COLOR: transparent; BORDER-RIGHT-WIDTH: 0px" link=#2f48ae>
<FONT style="FONT-SIZE: 10pt"><P align=left>

<FONT style="FONT-SIZE: 9pt" face=Arial color=#000000 style="font-size=10.0pt">

*****************TYPE YOUR NEWS HERE***********

</FONT>
</DIV>
</DIV>

</BODY>

</HTML>

Reply With Quote
  #2  
Old December 11th, 2007, 10:18 PM
Isaak Isaak is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Location: Belgium
Posts: 70 Isaak User rank is Sergeant (500 - 2000 Reputation Level)Isaak User rank is Sergeant (500 - 2000 Reputation Level)Isaak User rank is Sergeant (500 - 2000 Reputation Level)Isaak User rank is Sergeant (500 - 2000 Reputation Level)Isaak User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 18 h 52 m 41 sec
Reputation Power: 7
Why don't you just it even more simple?

You could create a script which loads news messages from a database or a file.

If you choose for a file, this could be an example:

Code:
2007-12-11|New website online!|Today we are glad to announce the new version of our website with a lot of new features! <a href='afile.php?read=more'>Read more..</a>
2007-12-12|Server maintenance|Because of the the increasing popularity of our website we'll have to do some maintenance in order to keep our website stable


The script should separate news messages from eachother and convert the line endings \r (mac), \r\n (windows) or \n (linux)
to <br> tags. And split the news parts where the "|" is, for example in PHP you could do it with the explode() function.

You could probably also create a script which lets the user easily enter news messages (e.g. using <textarea></textarea>) and convert the <br> tags to newlines.

Reply With Quote
  #3  
Old December 12th, 2007, 06:07 AM
pips pips is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 3 pips User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 20 m 31 sec
Reputation Power: 0
The ideal would maybe be a CMS. But that may not be feasible, or you might just have a very basic site right now. The person above me described using a text area to take inputs and add any required formatting tags to the basic text.

A quick look on google turned up this website: textfixer.com/tools/convert-line-breaks-br.php which will do the above for you, if you don't like the idea of doing it yourself.

I'm sure if you had a poke around you could find something out there that did more advanced formatting than just paragraphs and breaks. Try searching for 'convert text into html' or something like that.

That is all of course, if you don't feel like doing something yourself with databases or PHP or the like.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Using breaks in scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT