forums
new posts
donate
UER Store
events
location db
db map
search
members
faq
terms of service
privacy policy
register
login




UER Forum > Private Boards Index > Web/Graphic Design > Call too (Viewed 3689 times)
Xanadu 


Location: Las Vegas NV
Gender: Male
Total Likes: 0 likes




 |  | 
Call too
< on 3/5/2006 12:43 AM >
Reply with Quote
Posted on Forum: UER Forum
I want to setup my homepage or just the area that displays news to be able to be changed with just a .txt file. Like I want too drop a file into /serv1/files/web/site/example.txt and then it changes the news on the main page based on that. My site is not hosted locally though, so it would have to look at my home based servers for it. Can I just have like a iframe read the .txt files?




"Hey Fat Dave. <--Period"
ian_evil 


Location: Providence, Rhode Island
Gender: Male
Total Likes: 0 likes


we hope you have enjoyed our program.

 |  |  | AIM Message | Kaos Corporation
Re: Call too
< Reply # 1 on 3/5/2006 1:43 PM >
Reply with Quote
Posted on Forum: UER Forum
As far as I know, that kind of setup is only possible with PHP. There might be some way to fenagle it with javascript that reads the text as a source, but its probably more trouble than its worth.

If its just a simple site, I'd say try blogger, and format your news page to match the rest of your site.

Its as simple as inputing your FTP info, building a simple template, and then publishing through blogger. I also like it because anyone with a blogger ID can be added to my community and be allowed to publish news.




[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Mr. Motts 

Noble Donor


Location: Long Island and Brooklyn NY
Gender: Male
Total Likes: 2 likes




 |  |  | opacity.us
Re: Call too
< Reply # 2 on 3/10/2006 2:28 AM >
Reply with Quote
Posted on Forum: UER Forum
Any server side language that can read the contents of the file can do this quite easily (PHP, ASP, Perl, etc) but you'd need to know a little about the language and it has to be installed on your server.

If you don't want to use a server side language, the text files would need to be XML files (the raw text - example), then you'd have to write an xsl file that formats the data (like CSS - example). Put them together to get a designed XHTML page without any server side languages and you can do some complex formatting if so desired.

Learn XML - http://www.w3schools.com/xml/default.asp
Learn XSL - http://www.w3schools.com/xsl/default.asp



[last edit 3/10/2006 2:28 AM by Mr. Motts - edited 1 times]

Save the planet... kill yourself.
http://www.opacity.us/ - Abandoned Photography
kowalski 


Total Likes: 22 likes




 |  | 
Re: Call too
< Reply # 3 on 3/13/2006 7:42 PM >
Reply with Quote
Posted on Forum: UER Forum
You can do it with javascript (and it's actually really straightforward), but it's slower because of course it doesn't execute until the client's already brought down the rest of the page.




ian_evil 


Location: Providence, Rhode Island
Gender: Male
Total Likes: 0 likes


we hope you have enjoyed our program.

 |  |  | AIM Message | Kaos Corporation
Re: Call too
< Reply # 4 on 3/27/2006 3:09 AM >
Reply with Quote
Posted on Forum: UER Forum
If your server supports PHP use this single line:
<?php include_once('dir/file.txt'); ?>

  • You must open and close the PHP section with <?php and ?> tags.
  • To access a directory above the current one, use '../file.txt'.
  • The text file can contain HTML formatting, JavaScript, PHP and pretty much anything else.
  • You can also use different extentions, like '.html', '.php' or whatever.


Use the include line on your dynamic page. If you build a table or something, you could set it up like this:
<table>
<tr><td>News Header</td></tr>
<tr><td><?php include_once('dir/file.txt'); ?></td></tr>
<table>


And then have your included txt file generage new table rows:
Plain text news entry one. Can include HTML, etc.</td></tr>
<tr><td>Plain text news entry two. And stuff.</td></tr>
<tr><td>Final plain text news entry. Leave table row open.


I bought a book on PHP for $20 about a week ago. I can already build dynamic pages, store data in a MySQL database and XSS your website to hell. Its stupidly easy and, besides the book completely free. Learn PHP.




[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Sinister Crayon 


Location: Colorado
Gender: Male
Total Likes: 3 likes




 |  | 
Re: Call too
< Reply # 5 on 3/27/2006 11:07 PM >
Reply with Quote
Posted on Forum: UER Forum
Posted by .(ian_evil)
I bought a book on PHP for $20 about a week ago. I can already build dynamic pages, store data in a MySQL database and XSS your website to hell. Its stupidly easy and, besides the book completely free. Learn PHP.


What's the title...?




Xanadu 


Location: Las Vegas NV
Gender: Male
Total Likes: 0 likes




 |  | 
Re: Call too
< Reply # 6 on 4/1/2006 6:08 AM >
Reply with Quote
Posted on Forum: UER Forum
I couldnt get the PHP call to funtion to work.




"Hey Fat Dave. <--Period"
ian_evil 


Location: Providence, Rhode Island
Gender: Male
Total Likes: 0 likes


we hope you have enjoyed our program.

 |  |  | AIM Message | Kaos Corporation
Re: Call too
< Reply # 7 on 4/1/2006 11:01 PM >
Reply with Quote
Posted on Forum: UER Forum
Did it return an error, or just not fuction? Your server needs to have PHP installed for this to work. If you got no error message, than PHP probably isn't available where you have your site hosted. On the other hand, if you got any error message (including a blank page - this means the script has halted), there could be something wrong with your scripting.




[center][b]New England Industrial Culture Online[/b]
Stencil/Graffiti, Street Art - Industrial/Exprimental Music - Urban Exploration
"[i]We are the ones you had to dehumanize.[/i]"[/center]
Xanadu 


Location: Las Vegas NV
Gender: Male
Total Likes: 0 likes




 |  | 
Re: Call too
< Reply # 8 on 4/2/2006 10:50 PM >
Reply with Quote
Posted on Forum: UER Forum
Nothing shows. but it does have PHP enabled.




"Hey Fat Dave. <--Period"
TylerDurden 


Location: Worcester, Ma
Gender: Male
Total Likes: 0 likes




 |  |  | Urban Eden
Re: Call too
< Reply # 9 on 4/3/2006 5:06 AM >
Reply with Quote
Posted on Forum: UER Forum
Posted by Mr. Motts
Any server side language that can read the contents of the file can do this quite easily (PHP, ASP, Perl, etc) but you'd need to know a little about the language and it has to be installed on your server.

If you don't want to use a server side language, the text files would need to be XML files (the raw text - example), then you'd have to write an xsl file that formats the data (like CSS - example). Put them together to get a designed XHTML page without any server side languages and you can do some complex formatting if so desired.

Learn XML - http://www.w3schools.com/xml/default.asp
Learn XSL - http://www.w3schools.com/xsl/default.asp


I was reading down thinking I'd be the only one to think of XML, but you beat me to it. Those links Motts provided are great I taught myself XML and XSL from w3 schools a few months ago and those were really helpful.

On a side note, Urban Eden does exactly this with code very similar to the PHP code given above.




[last edit 4/3/2006 5:08 AM by TylerDurden - edited 1 times]

Ever wanted to be a pirate? We're recruiting!
http://www.uer.ca/...howallpb.asp?fid=1
WEB PIRATES FOR LIFE!

Check out my new site!
Urban Eden

My Webdesign company:
Mad Hatter Web Solutions

UER Forum > Private Boards Index > Web/Graphic Design > Call too (Viewed 3689 times)


Add a poll to this thread



This thread is in a public category, and can't be made private.



All content and images copyright © 2002-2024 UER.CA and respective creators. Graphical Design by Crossfire.
To contact webmaster, or click to email with problems or other questions about this site: UER CONTACT
View Terms of Service | View Privacy Policy | Server colocation provided by Beanfield
This page was generated for you in 109 milliseconds. Since June 23, 2002, a total of 737106683 pages have been generated.