Jump to content

Recommended Posts

Posted

Hello,

I am wanting to have my pop up news on the home page but laid out different to how it is default. I would like it like this

[HERE] Sebject of news item

The bit that says [HERE] must be linked to the news item in question

This is the contents of my PopUpNews.php

Please can you re-write it with the stuff i would like, thanks :)

James

<?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 © 2009-2010, David Clark

//@license http://creativecommons.org/licenses/by-nc-sa/3.0/

class PopUpNews extends CodonModule

{

public function popupnewsitem()

{

$id = $_GET['itemid'];

$result = PopUpNewsData::popupnewsitem($id);

Template::Set('item', $result);

Template::Show('popupnews_item.tpl');

}

public function PopUpNewsList($count=5)

{

$sql = 'SELECT id, subject, body, postedby, UNIX_TIMESTAMP(postdate) AS postdate

FROM ' . TABLE_PREFIX .'news ORDER BY postdate DESC LIMIT '.$count;

$res = DB::get_results($sql);

if(!$res)

return;

foreach($res as $row)

{

Template::Set('id', $row->id);

Template::Set('subject', $row->subject);

Template::Set('postdate', date('m/d/Y', $row->postdate));

Template::Show('popupnews_list.tpl');

}

}

}

  • Like 1
  • Moderators
Posted

the way you are asking it i don't think lots of folks want to help you we encourage people to try things themselfs.

no on your question if you have simpilots popup news it works like that

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.   Restore formatting

  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.

Loading...
×
×
  • Create New...