Cek this: Events

Those event news will be added through the admin CMS. I wonder how to create the link pages?

What should I name it? It seems like everytime I input a new event news I have to create a new php file.

Any idea?

4 Years
Discussion Span
Last Post by davy_yg

Sorry, I'm really confused by what you're asking or trying to do? Are you working with a database?


I mean when someone click learn more link, it will carry the person to another page which shows the whole article content with a picture in it.

So if I add 3 more event news then I will have to create another 3 events news php file to link it with the learn more link button.

for example:

learn more --> http://localhost/IndonusaCMS/event-title1.php
learn more --> http://localhost/IndonusaCMS/event-title2.php
learn more --> http://localhost/IndonusaCMS/event-title3.php

How to do that automatically?

Edited by davy_yg


So basically you need two php files. One to handle the main overview page, and a second one to handle the actual full article page.

Then what you're going to want to do is integrate with some type of database. MySQL tends to be the most common when working with PHP, simply because it's free (as is PHP) and they work well together. You would then create a table in the database of articles which includes all of the article information.

On the main overview page, your php file will fetch the articles from the database and print out their snippet descriptions.

On the actual article page, your php file will fetch the desired article from the database and print out the full article.

What you're asking for isn't very complex. One database. One table. One php file to view all. One php file to view an individual article. And then, behind the scenes, you're going to want yet a third php file for you to actually submit new articles into the database.


Do you use your own CMS? if yes, then you should make your own function that can handle that. Maybe you could follow the suggestions from @Dani. But if you use a CMS such as Joomla, feature like that is already available. In Joomla you can download Mini FrontPage extensions. It's free.


Thanks I already find a way out for the learn more link for the event summary.

Now, I am trying to print the event summary in the front page horizontally instead of vertically. How to do so?

This is what I have so far (vertical printing) = Event frontpage

This is my code:



$result = mysql_query("SELECT * FROM dynamic_content WHERE CatID='4'");

while ($data = mysql_fetch_array($result)){

echo '<div id="banner">';
echo '<div id="title">';
echo '<h1>'.'<a href="http://localhost/IndonusaCMS/events.php?id='.$data['ID'].'">'.$data['title'].'</a>'.'</h1>';
echo '</div>';

echo '<div id="images">'.'<img src="images/events/thumb/' . $data['images'] . '">'.'</div>'.'<br>';

echo '<div id="desc">';
echo '<div id="text">'.stringTrim($data['content'], 30, 'char').'</div>'.'<br>';

echo '<div id="text">'.substr($data['content'], 0, 30).'</div>'.'<br>';
echo '</div>';
echo '</div>';




#banner {margin: 0 0 0 -500px;}
#banner #title a:link{font-size: 15px; text-decoration: none; color: white; margin: 0 0 0 -300px; width: 50px; z-index: 2;}
#banner #title a:visited{font-size: 15px; text-decoration: none; color: white; width:50px; z-index: 2;}
#banner #images {margin: -50px 0 0 -800px; z-index: 2;}
#banner #desc #text {font-size: 6px; color: black;}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.