BleepingComputer.com: Change several areas of website with one file?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Change several areas of website with one file?

#1 User is offline   ChapperZHTID 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 43
  • Joined: 16-May 09
  • Gender:Male
  • Location:Margate

Posted 25 September 2010 - 03:54 PM

Hello BC

I have been working on a redesign of my website and I have most of it up and running but I am looking for something which I can't describe that good but I have a personal DJ website and on every page is a events where when there is a event it will update so that visitors no when there are events but currently that has to be done manually by editing the html each time but i was just curious is there a way which I could add a bit of code so that all the events on every page will update if I have 1 file with the information in.

I hope this makes sense and someone could point me in the direction or help me with what I am doing, all suggestions will be greatly appreciated

Thanks

#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 25 September 2010 - 04:19 PM

Yes it is possible. What sort of programming experience do you have?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   ChapperZHTID 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 43
  • Joined: 16-May 09
  • Gender:Male
  • Location:Margate

Posted 25 September 2010 - 05:26 PM

View Postgroovicus, on Sep 25 2010, 10:19 PM, said:

Yes it is possible. What sort of programming experience do you have?


If you mean this I only know HTML, CSS and some JavaScript

Thanks

#4 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 25 September 2010 - 09:10 PM

Unfortunately none of those will help you with your project at all. Those technologies run on the client computer; you need technology that will run on the server side since that is where the file containing the updates would reside. There is a tutorial I did on here that gives a brief introduction to dynamic web pages. You might want to check it out (it is in the stickies) and see if it makes sense.

Basically you are going to use some language or another to create a dynamic web page. Whatever language that you choose will be responsible for reading the file and converting the events into the appropriate HTML content. Most people would look to PHP for something like this since PHP has a large user base and tons of online tutorials.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#5 User is offline   ChapperZHTID 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 43
  • Joined: 16-May 09
  • Gender:Male
  • Location:Margate

  Posted 28 September 2010 - 11:33 AM

View Postgroovicus, on Sep 26 2010, 03:10 AM, said:

Unfortunately none of those will help you with your project at all. Those technologies run on the client computer; you need technology that will run on the server side since that is where the file containing the updates would reside. There is a tutorial I did on here that gives a brief introduction to dynamic web pages. You might want to check it out (it is in the stickies) and see if it makes sense.

Basically you are going to use some language or another to create a dynamic web page. Whatever language that you choose will be responsible for reading the file and converting the events into the appropriate HTML content. Most people would look to PHP for something like this since PHP has a large user base and tons of online tutorials.


Hello Groovicus.

Thank you for your reply, I wish you told me what I had to do because I found out it is really easy and the knowledge I do no, made it happen, easily.

What I did was created a PHP script with my HTML code of
<div>

<p><b>Please PHP Work</b><br />
PHP SCRIPT WOOOO<br />
<a href="http://www.google.co.uk">Read more...</a></p>

<p><b>No Current Event Date</b><br />
No Current Details<br />
<a href="java script:void(0)">Read more...</a></p>

</div>


This is the text which I wanted to update when I update the one file.

I then called that filename.inc (filename is not the real name)

Then in my html code put:
<?php

	include_once("filename.inc");

?>


and then save all my html pages to PHP even though its HTML inside and it will now update with the one file.

Thanks for your help anyway and I posted this reply just in case anyone else has the problem

#6 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 28 September 2010 - 12:49 PM

Well when I asked you what experience you had, you didn't mention anything about knowing PHP. I then went on to tell to tell you that you would need to use something like PHP in order to accomplish this.

So please clarify; what is it that I didn't tell you? Did you expect me to write the code for you? :thumbsup:
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#7 User is offline   ChapperZHTID 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 43
  • Joined: 16-May 09
  • Gender:Male
  • Location:Margate

Posted 28 September 2010 - 01:48 PM

View Postgroovicus, on Sep 28 2010, 06:49 PM, said:

Well when I asked you what experience you had, you didn't mention anything about knowing PHP. I then went on to tell to tell you that you would need to use something like PHP in order to accomplish this.

So please clarify; what is it that I didn't tell you? Did you expect me to write the code for you? :thumbsup:



I didn;t expect you to write the code as I know what you are like since i joined this forum but i wish you said how easy it was i dont mind that you didnt tell me but never mind its done now

#8 User is offline   ProfessorBean 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 16
  • Joined: 27-September 10

Posted 30 September 2010 - 04:18 PM

View PostChapperZHTID, on Sep 25 2010, 02:54 PM, said:

Hello BC

I have been working on a redesign of my website and I have most of it up and running but I am looking for something which I can't describe that good but I have a personal DJ website and on every page is a events where when there is a event it will update so that visitors no when there are events but currently that has to be done manually by editing the html each time but i was just curious is there a way which I could add a bit of code so that all the events on every page will update if I have 1 file with the information in.

I hope this makes sense and someone could point me in the direction or help me with what I am doing, all suggestions will be greatly appreciated

Thanks



A CSS sheet would of allowed you to do that, just set it so you can ftp it right to your web page every time you edit events, the css sheet will auto update the parts of the site you want.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users