/    Sign up×
Community /Pin to ProfileBookmark

How to put a editable file on a website – urgent matter

I have a church that wants to put a calendar on a website. I suggested google calendar but they do not want to use that. Their technical knowledge is limited. What they want to do is just be able to put a document some time of word type document on the site so that they can go onto the site and just edit it. I have never had this requested before so I am totally unfamiliar at what to do to help them. It needs to be something that is very simple to go and add their events right on their site.

I would appreciate any assistance in getting this matter resolved.?

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulAug 06.2015 — There are problems with any such request, particularly if the site is built with a CMS which may restrict what you can, and cannot, do. However, that aside, technically it is, in essence, quite simple: Use a PHP include file. This can be done in a variety of ways. E.g. Using the PRE tag:

[code=html]
<div id="calendar"><pre><code>
<?php include 'calendar/calendar.txt'; ?>
</code></pre></div>
[/code]


This assumes that:

a) There is a folder "calendar" off the root of the site, which contains a text file called "calendar.txt".

b) The ID "calendar" is used to determine the size and placement of the calendar.

c) The tag <PRE> provides basic formatting of the text:

- White space and line breaks in the text will be preserved.

- Upper case and/or underscores can be used to distinguish headings.

- There is no bold, italic, or font size settings.

d) The tag <CODE> forces the use of a mono-spaced font, so that columns will line up.

Alternatively, without the <PRE> and <CODE> tags:

[code=html]
<div id="calendar">
<?php include 'calendar/calendar.html'; ?>
</div>
[/code]


This assumes that:

a) There is a folder "calendar" off the root of the site, which contains an HTML file called "calendar.html".

b) The ID "calendar" is used to determine the size and placement of the calendar. It can also be used to format the text.

c) Basic HTML tags (<H1>, <H2>, <H3>, <P>, <I>, <B> and <BR>) are embedded in the calendar file to apply the formatting set by the ID "calendar".

There are pros and cons to each approach. I'd suggest that you experiment with both ways of doing it and come to an agreement with the people who are going to use it as to which (if either) they wish to use! ?

Postscript

I forgot to mention that this requires that:

1. The web page must have the file extension ".php" instead of ".html", to alert the server to the presence of PHP code.

2. To test the code you will need a local host such as WampServer (which is free and very easy to install).
Copy linkTweet thisAlerts:
@jacquidmorganauthorAug 06.2015 — Thanks so much. For your help.
×

Success!

Help @jacquidmorgan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...