SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Support / lasts posts add on
Posted:  26 Nov 2005 19:59   Last Edited By: acjnas
hi, i am an old user of your great seo-board ,
and now i want to implement the last posts addon on my main page, but i am using a cms and i would like to know if i can put the add on on one of the panels on the right of the web, i have the forum script in a folder call "foro" so the path is /foro

can you help with the "include" code

my website is www.queboleta.com
Posted:  26 Nov 2005 22:07
Code:

<?php DEFINE ('SEO-BOARD', true); include('./foro/lastposts_addon.php');?>

Let me know if you encounter problems.
Posted:  28 Nov 2005 00:32
hey there, i tried the last posts addon aswell, but i have a problem, i get the error ; FATAL ERROR: File not found addon_lastpostscell .

I Copied the 2x .htm files inside the forums/skins/ folder, and the .php file inside /forums/, and i used this code to include it ;
<?php DEFINE ('SEO-BOARD', true); include('forums/lastposts_addon.php');?>

AND, i had to change some locations inside the lastposts_addon.php which were ;

require ('code/functions.php');
require ('code/skinning.php');
require ("lang/$lang.php");

from ./lang | ./code .

Please help me out, my site is ; http://thuglife.no/forum.php (using a iframe)
Posted:  28 Nov 2005 10:21
Try removing the './' from this line in /code/skinning.php (get_template function)
Code:

$tn = './skin/'.$template_name.'.htm';

will become
Code:

$tn = 'skin/'.$template_name.'.htm';
Posted:  28 Nov 2005 11:17
that gave the same error, but i changed the line to ; "forums/skin/" and that worked fine =). But i wounderd if you could help me out some more, after I got it working with this code;
<?php DEFINE ('SEO-BOARD', true); include('forums/lastposts_addon.php');?> I got a serious error on the poll im running, what may cause this? the include line i use for that is; <?php
include("poll.php");
run_poll("1004206937", $HTTP_POST_VARS, "");
?>

And the errors i recived on the frontpage are:

Notice: Undefined variable: opt in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 18

Notice: Undefined variable: opt in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 23

Notice: Undefined variable: opt in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 24

Notice: Undefined variable: opt in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 29

Notice: Undefined variable: opt in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 41

Notice: Use of undefined constant a - assumed 'a' in /home/apache/htdocs/kunder/thuglife.no/www/poll.php on line 47
Watcha think of our new site?! 

Notice: Undefined variable: total_votes in /home/apache/htdocs/kunder/thuglife.no/www/poll_obj.php on line 248

Thanks for any help, it's really appreciated!.

Andy
Posted:  28 Nov 2005 13:03
oups, that dident work that great, i got this error after editing it to "forums/skin" :
FATAL ERROR: File not found mainguestnavigation
.

I've tried everything, i just can't figure out howto get it to work. Thanks in advance. Hope im not bothering ya with my errors. hehe.

Andy
Posted:  28 Nov 2005 15:24
Damn, I've written the latest posts addon lamely (the path stuff is not flexible). I'll upgrade the addon. Ok. The easiest way to fix it is to add a new copy of the get_template function (with another name) in the lastposts_addon.php. Copy the get_template function and paste it in lastposts_addon.php with another name (example: last_get_template()) and then call last_get_template() in the lastposts_addon.php file. In the new last_get_template() function fix the path and it should work.
Posted:  28 Nov 2005 15:53
Hey, try this version of the get_template() function (edit /code/skinning.php)
Code:

function get_template($template_name)
{
  $tn = dirname(__FILE__).'/../skin/'.$template_name.'.htm';
  if (file_exists($tn))
  {
    $t = file_get_contents($tn);
    return "return <<<TMP\r\n<!-- START: $template_name -->\r\n{$t}\r\n<!-- END: $template_name -->\r\nTMP;\r\n";
  }
  else
    die("FATAL ERROR: File not found $template_name");
}
Posted:  28 Nov 2005 16:06
Last update: download the latest addon version (see my announcement). That should work well.
Posted:  29 Nov 2005 14:32
Thanks =). I'll give you a hint if I get more probs.