freshJet Posted August 6, 2011 Report Share Posted August 6, 2011 Is there a way to make the last 3 or 4 PopUpNews articles appear in an HTML marquee? Quote Link to comment Share on other sites More sharing options...
Jon Posted August 6, 2011 Report Share Posted August 6, 2011 You'll need to edit popupnews_list.tpl first: <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ ?> <a href="<?php echo SITE_URL ?>/index.php/PopUpNews/popupnewsitem/?itemid=<?php echo $id;?>"><?php echo $subject;?></a> | Then Get the HTML Marquee code: <MARQUEE></MARQUEE> Then combine the two: <MARQUEE> <?php PopUpNews::PopUpNewsList(5); ?> </MARQUEE> Was that so difficult? Jon 1 Quote Link to comment Share on other sites More sharing options...
freshJet Posted August 6, 2011 Author Report Share Posted August 6, 2011 Nope, very easy. But I still want it to display in my sidebar too... Quote Link to comment Share on other sites More sharing options...
Jon Posted August 6, 2011 Report Share Posted August 6, 2011 Only Idea is to make a copy and rename it to side news or something Jon Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 6, 2011 Administrators Report Share Posted August 6, 2011 To seperate it you can do something like this; PopUpNews.data.class add: function get_latest_news() { $query = "SELECT * FROM ".TABLE_PREFIX."news ORDER BY postdate DESC"; return DB::get_row($query); Add a limit to the sql call and change the return method to get more than one news story returned. in your controller function for the page you want to view it on set the variable; $this->set('news', PopUpNewsData::get_latest_news()); The in your view use; <marquee> <?php echo '......'.strip_tags($news->subject).'......'.strip_tags($news->body); ?> </marquee> You can remove the php strip_tags function but it will then include the html tags from the news editor which I usually find undesireable in a maquee situation. 1 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.