TAV1702 Posted March 5, 2011 Report Posted March 5, 2011 I agree with Simpilot. I have had that error on phpVMS and phpBB forums numerous times and that is what it always was. A white space before or after a php tag. Quote
TAV1702 Posted March 7, 2011 Report Posted March 7, 2011 ok got that...so "body" is a good variable? And this line is placed directly beneath the orginal call? Thanks I have been trying to figure this one out on how to get the first so many characters of the body to appear with a read more link. I did get the read more link to appear and work, I just can not get the body to show. I know how to limit the characters too. Not sure what I am doing wrong. Quote
Administrators simpilot Posted March 8, 2011 Author Administrators Report Posted March 8, 2011 I have been trying to figure this one out on how to get the first so many characters of the body to appear with a read more link. I did get the read more link to appear and work, I just can not get the body to show. I know how to limit the characters too. Not sure what I am doing wrong. Did you add the "body" field to the call within the module? I think that you are probably not getting the data to the template. Quote
TAV1702 Posted March 8, 2011 Report Posted March 8, 2011 Did you add the "body" field to the call within the module? I think that you are probably not getting the data to the template. I attempted to. I am more than sure that is where my problem is. I tried to follow what you instructed me to do a few posts up with another little thing I was working on. I think I just simply jacked up the needed code for the module. Ray Quote
TAV1702 Posted March 30, 2011 Report Posted March 30, 2011 Hi Dave. I just recently upgraded to the latest beta and I get this once clicking a link with the news module. Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'PopUpNews::popupnewsitem' was given in /home/xxxxxx/public_html/xxxxxx/core/classes/MainController.class.php on line 218 I have tinkered with it some but no luck with it. I hate to mess with it to much for fear of really messing something up. Prior to the upgrade to beta, I replaced all the popup news files with the standard files from the download from this thread. So they are bone stock files. No Ray interference involved. Any ideas you could throw at a guy? Quote
TAV1702 Posted March 30, 2011 Report Posted March 30, 2011 Sorry Dave. I uploaded the files from the original post in this thread. I forgot about the updated version on page two of this thread. All is well and working fine. Yet another proud, ever so popular blonde moment from Ray. Quote
FiveStar Posted April 25, 2011 Report Posted April 25, 2011 hi simpilot i have a little query for you regarding PopUpNews i wanted to place a table on my front page where my PopupNews will show or either i can put it in Pilot center but the problem is it wont allowing me to place an table with header when i try to put an table this happens IMAGE REMOVED Now you can notice in Pic that table is all messed up and most importantly it was showing Title for every news item in every Row it was appearing i only want normal title on the Header Area and than my news items under the table box.......... this code i was using currently <?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/ ?> <style type="text/css"> #customers { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; width:100%; border-collapse:collapse; } #customers td, #customers th { font-size:1em; border:1px solid #98bf21; padding:3px 7px 2px 7px; } #customers th { font-size:1.1em; text-align:left; padding-top:5px; padding-bottom:4px; background-color:#A7C942; color:#ffffff; } #customers tr.alt td { color:#000000; background-color:#EAF2D3; } </style> <table id="customers" class="tablesorter"> <th>Important Updates & News</th> <tbody> <tr class="alt"> <td align="center"> <a href="<?php echo SITE_URL ?>/index.php/PopUpNews/popupnewsitem/?itemid=<?php echo $id;?>"><b><u><?php echo $subject;?></b></u></a><br> <?php echo $postdate;?> </tbody> </table> Awaiting you....... Quote
Jeff Posted April 25, 2011 Report Posted April 25, 2011 It looks to me that you are missing these (just before </tbody>) </tr> </td> to close the tables. Quote
Administrators simpilot Posted April 25, 2011 Author Administrators Report Posted April 25, 2011 The popupnews_list template is called through a foreach loop in the module so you need to do one of two things, 1- open and close the table in the module and just have row commands in the template or 2 - create a table for each line in the template example template <table> <tr> <td> <a href="<?php echo SITE_URL ?>/index.php/PopUpNews/popupnewsitem/?itemid=<?php echo $id;?>"><b><u><?php echo $subject;?></b></u></a><br /> <?php echo $postdate;?> </td> </tr> </table> Quote
FiveStar Posted April 25, 2011 Report Posted April 25, 2011 Simpilot i used your given code also but the main problem is this it was showing A title on every Row i only wanted to show Title on TOP of the Table and the content in the table BOX 1 Quote
Administrators simpilot Posted April 25, 2011 Author Administrators Report Posted April 25, 2011 The popupnews_list.tpl file repeats however many times you have it set to, so anything you have in it is going to show that many times. Move the title into the main page you are using prior to calling the popupnews function. Quote
SkilledPilotA320 Posted May 9, 2011 Report Posted May 9, 2011 Error for me, some thing comes like this - Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'PopUpNews::popupnewsitem' was given in /home1/akariyou/public_html/aivirtual/core/classes/MainController.class.php on line 218 PLEASE HELP ME, I DONT HAVE ANY IDEA! Quote
Tylor Eddy Posted May 15, 2011 Report Posted May 15, 2011 G'day Simpilot, I recieve the message below on my site, Latest News Notice: The template file "/home/qantasvi/public_html//core/templates/popupnews_list.tpl" doesn't exist in /home/qantasvi/public_html/core/classes/TemplateSet.class.php on line 248 PopUpNews © simpilotgroup.com this can be viewed on my site: http://qantasvirtual.com/ Quote
Administrators simpilot Posted May 15, 2011 Author Administrators Report Posted May 15, 2011 Looks like you did not put the popupnews_list.tpl file in your core/templates or skin folder. Quote
Tylor Eddy Posted May 16, 2011 Report Posted May 16, 2011 Looks like you did not put the popupnews_list.tpl file in your core/templates or skin folder. G'day simpilot, Got it working, deleted the news_newsitem module from my server, not its not displaying in the top corner anymore, thanks for your support Regards Tylor Quote
ssting34 Posted June 5, 2011 Report Posted June 5, 2011 Thanks for this addon, quick question how do I get it to pop up when you click on the news. Right now it does that but it also shows it in the main area of the web page all the time. Here is a link so you can see what I mean............................ http://www.dutchessairva.org/index.php/ Quote
vader21 Posted June 13, 2011 Report Posted June 13, 2011 How about this? <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td>Title</td> </tr> <?php foreach($res as $row) { ?> <tr> <td><?php echo $row->subject;?></td> </tr> <?php } ?> </table> How would i make that work, without having an invalid foreach? Thank you. Quote
Administrators simpilot Posted June 15, 2011 Author Administrators Report Posted June 15, 2011 @vader21 Where are you placing this? Are you loading the $res variable prior to this code? Quote
vader21 Posted June 16, 2011 Report Posted June 16, 2011 Oh never mind i got things working fine with this <?php $res = SiteData::GetAllNews($row->id); ?> Quote
Ahmad Posted June 22, 2011 Report Posted June 22, 2011 vader21 Can you please post your amended code please..... i will really appreciate it. Thanks in advance Ahmad Quote
vader21 Posted June 22, 2011 Report Posted June 22, 2011 <?php $res = SiteData::GetAllNews($row->id); ?> <?php $i = ( int )1; foreach($res as $row){ ?> <?php if ( $i == ( int )5 ) { break; } else { $i++; } } ?> Now remember when you call the class on your front page leave it as (1) not 5. Good Luck Quote
Ahmad Posted June 23, 2011 Report Posted June 23, 2011 i am sorry but i am noob in all this putting together can you be more specific please where all that code goes exactly with table........ Thanks Ahamd Quote
vader21 Posted June 23, 2011 Report Posted June 23, 2011 This is the entire code for that tpl just copy and paste! This is only to show the news on a table! <?php $res = SiteData::GetAllNews($row->id); ?> <table width="100%" cellspacing="0" cellpadding="4"> <tr align="center" class="row1"> <td><strong>News Title</strong></td> <td><strong>Date Submitted</strong></td> <td><strong>Written by</strong></td> <td><strong>News ID</strong></td> </tr> <?php $i = ( int )1; foreach($res as $row){ ?> <tr align="center"> <td><a href="<?php echo SITE_URL ?>/index.php/PopUpNews/popupnewsitem/?itemid=<?php echo $row->id;?>"><?php echo $row->subject;?></a> </td> <td><?php echo date("D, d M Y ", $row->postdate);?></td> <td><?php echo $row->postedby;?></td> <td><?php echo $row->id;?></td> </tr> <?php if ( $i == ( int )5 ) { break; } else { $i++; } } ?> </table> 1 Quote
Ahmad Posted June 23, 2011 Report Posted June 23, 2011 +1 for you man i have been looking for same thing from many days and you done it all credit goes to you thank you so much Regards Ahmad 1 Quote
Angel Air Posted August 27, 2011 Report Posted August 27, 2011 Hi all, getting this error since I moved my website to fivedev any help would be great. I should say that I have uploaded the 1.1 version and I am still getting the same error. here is the error... Fatal error: Class 'PopUpNews' not found in /home/********/public_html/lib/skins/detachable/layout.tpl on line 237 or you can see it on my website just click my signature. Thanks Scott Quote
Administrators simpilot Posted August 29, 2011 Author Administrators Report Posted August 29, 2011 I just went to your site and used the url; http://angelairva.co.uk/index.php/popupnews and get the error that the module doesn't exist. Check and make sure both the module folder and the data class are in the file tree. Quote
Angel Air Posted August 29, 2011 Report Posted August 29, 2011 I am not sure if anyone else has had this problem but this is the reason why mine did not work. After looking at what simpilot suggested I noticed that the folder was incorrectly named it should be PopUpNews instead mine was popupnews so it could not find the file but all fixed now. thanks simpilot. Scott Quote
Tylor Eddy Posted December 12, 2011 Report Posted December 12, 2011 G'day Simpilot, I have an idea for this module. I wanted to know if it was possible to add a flashing gif image to display on all the unread news items in my list, this will make pilots more aware of the new posts as the news list is rather discrete on my website. is it possible to be able to determine if a newsitem is read by a pilot ? Regards Tylor Quote
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.