Re: include('http://host.com/forums/extern.php?action=active');
Should i type like this?
<?PHP
require('http://punbb.org/forums/extern.php?action=active');
?>
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → include('http://host.com/forums/extern.php?action=active');
Should i type like this?
<?PHP
require('http://punbb.org/forums/extern.php?action=active');
?>
Well anyway, this is how i put in it:
<?PHP
require('http://forum.art4gamers.net/extern.php?action=active');
?>
And look! http://www.art4gamers.net/testpage.php - Still doesn't work.
'allow_url_fopen' doesn't matter when using include('forum/extern.php?action=active'); right?
and also i typed:
<?PHP
require('http://punbb.org/forums/extern.php?action=active');
?>
That didn't work either.
i typed in this:
<?PHP
@require("http://forum.art4gamers.net/extern.php?action=active");
?>
No error message, but no topics either...
'allow_url_fopen' doesn't matter when using include('forum/extern.php?action=active'); right?
I think it does. If it is disabled, PHP will look for a file called "extern.php?action=active" and not just "extern.php".
and also i typed:
<?PHP
require('http://punbb.org/forums/extern.php?action=active');
?>That didn't work either.
If that didn't work, that means there's something with the B-one setup that is interfering. Try this:
<?php
$_GET['action'] = 'active';
require('forum/extern.php');
?>
<?php
$_GET['action'] = 'active';
@require('forum/extern.php');
?>
and this:
<?php
$_GET['action'] = 'active';
require('forum/extern.php');
?>
and i get:
There is no valid language pack 'en' installed. Plese check $language setting in config.php.
on both of the codes
Hmm, how does your config.php look?
<?php
$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'art4gamers_net';
$db_username = 'art4gamers_net';
$db_password = 'shhhh';
$db_prefix = 'foo_';
$p_connect = false;
$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;
$language = 'en';
define('PUN', 1);
?>
Jesus, disabling allow_url_fopen really screws up a lot of stuff. Then again, B-one is probably the cheapest hosting company around so I guess we can't expect too much from them :rolleyes:
I guess you're gonna have to do it "manually". Have a look at this post. It contains code for displaying the latest topics on a page outside the forums. The first code piece can be put at the top of your testpage.php and the second piece of code should be put where you want your list of topics to show up. The only line of code you should have to alter is:
$pun_root = '../forums/';
In your case, I believe it should be set to:
$pun_root = './forum/';
ehh, where to put the first code exactly:
<HTML>
<HEAD>
<BODY>
Over <HTML>? Or under <HEAD> or Under <BODY>?
Well i be dammed, it finally worked... Holy crap!
Thank you a lot for taking your time, thx :=)
NP. Just promise to go with a better hosting company next time :)
I actually e-mailed them, i asked them why they hade so many "old stuff" . They said that they are currently upgrading.
I don't know for how long time they've been "upgrading" or when it's gonna finish... But well see.
can you give me a tip about a better host? not to expensive though
can you give me a tip about a better host? not to expensive though
A very, very good webhost is http://www.lunarpages.com
In Sweden, I recommend Loopia.
Hej igen, det återstor bara ett litet problem med topic visandet...
Jag vill ha de senaste längst up, över de äldre, inte tvärtom...
kolla: http://www.art4gamers.net
Den senaste "news comments" ligger underst, och den gammla överst.
Var? Jag ser inte "news comments" någonstans.
Därför jag radera dem, jag kan göra 2 test trådar igen.
Den jag skapar först kommer heta: Test #1
Den jag skapar efter Test #1 kommer heta: Test #2
*EDIT - Kolla:
· Test #1
· Test #2
Hmm, ok. Vilken kod kör du för att visa de där trådarna?
<?php
$result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t,'.$db->prefix.'forums AS f WHERE t.forum_id=f.id AND f.admmod_only=0 AND t.moved_to IS NULL ORDER BY t.last_post LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
while ($cur_topic = $db->fetch_assoc($result))
{
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if (pun_strlen($cur_topic['subject']) > 30)
$cur_topic['subject'] = trim(substr($cur_topic['subject'], 0, 24)).' ...';
echo "\t\t\t\t\t\t\t".'<b>·</b> <a href="http://forum.art4gamers.net/viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a><br>'."\n";
}
?>
Change the first row to:
result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t,'.$db->prefix.'forums AS f WHERE t.forum_id=f.id AND f.admmod_only=0 AND t.moved_to IS NULL ORDER BY t.last_post DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
Please speak english. If I read a question in swedish, I automatically answer in swedish. If you need to speak swedish, ask your question in the swedish forum.
I've been trying to get this work also, and I'm getting this error
Warning: require(./include/functions.php) [function.require]: failed to open stream: No such file or directory in /home/webcoder/web/html/forum/extern.php on line 127
Fatal error: require() [function.require]: Failed opening required './include/functions.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/webcoder/web/html/forum/extern.php on line 127
I'm using this code
<?php
$_GET['action'] = 'active';
require('forum/extern.php');
?>
I have database connection code at the top of the page I'm trying to get the topics to show up on
That won't work in 1.2, because of the PUN_ROOT settings.
PunBB Forums → PunBB 1.2 troubleshooting → include('http://host.com/forums/extern.php?action=active');
Powered by PunBB, supported by Informer Technologies, Inc.