Welcome to Geeklog Friday, May 24 2013 @ 05:54 AM EDT
|
||||||||
![]() |
Forum Index > Extensions > Cool Hacks |
New Topic
|
Post Reply
|
Convert your index page to Headlines |
|||
| ofey |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/18/05 Posts: 213 |
I presume the index.php file I'm to change is at:
/trojanswimclub.ie/index.php Does that sound correct? Those who say it can't be done, are usually interrupted by others doing it. |
||||||
|
|||||||
| machinari |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/22/04 Posts: 1512 |
yes, that sounds correct.
|
||||||
|
|||||||
| ofey |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/18/05 Posts: 213 |
Oh I'm not the brightest
I edited index.thtml instead of index.php All sorted now. Thanks for your patience. Those who say it can't be done, are usually interrupted by others doing it. |
||||||
|
|||||||
| Robin |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 02/15/02 Posts: 725 |
Below you can find an updated version, for GL 1.3.11, of the hack that will enable you to list titles only on the front page. Original instructions in the first post in this topic.
1. firstly, you create a new template frontstorytext.thtml with the following content PHP Formatted Code <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr> <td colspan="2" align="left" bgcolor="#e1e2e5"><span class="articleTitle"><a href="{site_url}/article.php?story={story_id}">{story_title}</a></span></td> </td> </tr> </table> 2. next, open index.php 3. find: $display .= STORY_renderArticle($A,'y'); 4. replace with: $display .= STORY_renderArticle( $A, 'y', 'frontstorytext.thtml' ); 5. save, and you're good to go Geeklog Polish Support Team |
||||||
|
|||||||
| Anonymous: jnuker |
|
||||||
|
|
how can i add a short date to it, in dd/mm/yyyy format?
{story_date} returns long date, together with time... |
||||||
|
|||||||
| Anonymous: jnuker |
|
||||||
|
|
PHP Formatted Code <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr> <td width="20%">{story_date}</td> <td width="80%" align="left" bgcolor="#e1e2e5"><span class="articleTitle"><a href="{site_url}/article.php?story={story_id}">{story_title}</a></span></td> </td> </tr> </table> so if I used it like this, the date is "Friday, February 25 2005 @ 02:35 PM EST" your hints are much appreciated |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: online ![]() Registered: 01/12/02 Posts: 13027 |
The date is formatted according to the user's preferred date format (from their preferences) or according to $_CONF['date'] if they chose "system default" (or are not logged in).
bye, Dirk |
||||||
|
|||||||
| Anonymous: Ruchir |
|
||||||
![]() |
:banana:
Thanks a lot, specially to robin. This was of great help to me. The geeklog forum rules Dirk. Regards, Ruchir |
||||||
|
|||||||
| eyecravedvd |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 06/09/03 Posts: 152 |
I have an interesting dilemma when implementing this hack. It only converts the first story into a headline and all the rest show the normal story. Any advice?
Can be seen here Cheers, Shane Shane | www.EyeCraveDVD.com |
||||||
|
|||||||
| eyecravedvd |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 06/09/03 Posts: 152 |
Nevermind. There are 2 spots you must place it in index.php... fixed.
Shane | www.EyeCraveDVD.com |
||||||
|
|||||||
| Don |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 06/09/04 Posts: 153 |
I'm bumping this because I'm searching for code that will do exactly this.
Any chance this will work in 1.4.1? - Don |
||||||
|
|||||||
| Don |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 06/09/04 Posts: 153 |
Is there a way to modify this to display links to files that have been uploaded via File Mangement?
- Don |
||||||
|
|||||||
| Content generated in: 2.18 seconds |
|
|
|