Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Change several areas of website with one file?


  • Please log in to reply
7 replies to this topic

#1 ChapperZHTID

ChapperZHTID

  • Members
  • 43 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Margate
  • Local time:02:21 AM

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

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:21 PM

Posted 25 September 2010 - 04:19 PM

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

#3 ChapperZHTID

ChapperZHTID
  • Topic Starter

  • Members
  • 43 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Margate
  • Local time:02:21 AM

Posted 25 September 2010 - 05:26 PM

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 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:21 PM

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.

#5 ChapperZHTID

ChapperZHTID
  • Topic Starter

  • Members
  • 43 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Margate
  • Local time:02:21 AM

Posted 28 September 2010 - 11:33 AM

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 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:21 PM

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:

#7 ChapperZHTID

ChapperZHTID
  • Topic Starter

  • Members
  • 43 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Margate
  • Local time:02:21 AM

Posted 28 September 2010 - 01:48 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:



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 ProfessorBean

ProfessorBean

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:07:21 PM

Posted 30 September 2010 - 04:18 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



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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users