RSprinkel Posted December 19, 2007 Share Posted December 19, 2007 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. 0 Quote Link to comment Share on other sites More sharing options...
Cody Salter Posted December 19, 2007 Share Posted December 19, 2007 You can just edit the template for it. 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 19, 2007 Author Share Posted December 19, 2007 Thanks Much YukonMaster. Ok I did that and worked fine, however when I click on the title of the Announcement nothing happens. Not sure how to code this to get it to work. Sorry for the lack of knowledge on this type of file. Ron S. 0 Quote Link to comment Share on other sites More sharing options...
robbo Posted December 19, 2007 Share Posted December 19, 2007 You have to have version 3.5 as this brings in the backend coding for doing this. Then it's the "announcements.tpl" and "viewannouncements.tpl" to edit the look of them (if you want to) 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 19, 2007 Author Share Posted December 19, 2007 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. 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 19, 2007 Author Share Posted December 19, 2007 Do I need to delete the files in the templates_c folder? 0 Quote Link to comment Share on other sites More sharing options...
robbo Posted December 19, 2007 Share Posted December 19, 2007 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. 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 19, 2007 Author Share Posted December 19, 2007 Yes mine has the tags around it and every link I put the cursor on it shows this at the bottom: ../../announcements.php?id= So it isn't recognizing the id of each of the announcements for some reason. Ron S. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted December 19, 2007 Share Posted December 19, 2007 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 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 19, 2007 Author Share Posted December 19, 2007 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 0 Quote Link to comment Share on other sites More sharing options...
Si Posted December 19, 2007 Share Posted December 19, 2007 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 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 20, 2007 Author Share Posted December 20, 2007 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. 0 Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted December 20, 2007 Author Share Posted December 20, 2007 Ok I finally got it to work, DUMMY ME forgot that I was using the 3.4 vers and not the current one. So after upgrading it to 3.5 it all works now. Thanks all for your help and I apologize for my newbie ways. Ron S. 0 Quote Link to comment Share on other sites More sharing options...
BionHostStan Posted February 8, 2008 Share Posted February 8, 2008 how do I have some of the announcement text appear, like in http://demo.whmcs.com/announcements.php? Actually, how do I get that format? 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 9, 2008 Share Posted February 9, 2008 The announcements template file will let you play around with it. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.