Jump to content

Announcements


RSprinkel

Recommended Posts

I have seen several sites with just the links to the announcements on an announcement page with the date and title but not the full announcements.

 

I would like to know how this is done as I have searched and cannot find the way to do this.

 

Thanks much in advance,

 

Ron S.

Link to comment
Share on other sites

Yup running 3.5 currently.

 

This is what I did in the announcements.tpl file. I moved the date above the Title and removed this line all together: {$announcement.text|truncate:200:"..."}.

 

In the viewannouncements.tpl I moved the date above the title and removed this line:<p>{$text}</p>

 

All looks good, when I click on any of the linked titles still nothing happens. Again I am not to savvy when working with this sort of stuff, LOL. Sorry.

 

Ron S.

Link to comment
Share on other sites

Has your title got link tags around it?

<a href="{$smarty.server.PHP_SELF}?id={$announcement.id}">{$announcement.title}</a>

I'm pretty sure thats what the announcement.tpl has as default (I've changed mine).

 

Deleting the files in templates_c won't do anything bad, so might as well give it a try.

Link to comment
Share on other sites

Yup running 3.5 currently.

 

This is what I did in the announcements.tpl file. I moved the date above the Title and removed this line all together: {$announcement.text|truncate:200:"..."}.

 

If you don't want the 200 characters of text, don't remove that line, change the truncate:200 to truncate:000

 

Try that.

 

Si

Link to comment
Share on other sites

Well that still didn't work. Well it did as far as only the link showing, but it isn't pointing to any id's

 

http://www.royal-hosting.net/orders/announcements.php

 

Looks like your code is missing the announcement:id

 

Try this in your announcements.tpl file.

 

 

{foreach key=num item=announcement from=$announcements}
<div align="left">
 <table border="0" cellpadding="3" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
   <tr>
     <td width="100%"><strong><a href="{$smarty.server.PHP_SELF}?id={$announcement.id}">{$announcement.title}</a></strong><br />
{$announcement.text|truncate:00:"..."}
<strong>{$announcement.date}</strong></td>
     </tr>
     <tr>
       <td width="100%" align="center">
       <img border="0" src="clients/images/horizontal_line.gif" width="400" height="6"></td>
     </tr>
   </table>
 </div>
<p>{foreachelse} </p>
<p align="center"><strong>{$LANG.announcementsnone}</strong></p>
{/foreach} <br>
 <p align="center"><img src="images/clientarea/rssfeed.gif" align="middle" alt="" /> <a href="announcements.xml">{$LANG.announcementsrss}</a></p>

 

Si

Link to comment
Share on other sites

Hi SI,

 

Thanks for the reply. Well I added your code into my announcements.tpl and still getting the same thing. It is not picking up the Announcement ID. I even did a test Announcement and still nothing. I don't know what is going on.

 

Again thanks for the help.

 

Ron S.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated