101

Re: PunBB Miniportal v1.2.x

yes! this is solved -- my forum id was wrong :-) duh duh

102

Re: PunBB Miniportal v1.2.x

hehe no problem smile

103 (edited by af3 2005-06-18 16:28)

Re: PunBB Miniportal v1.2.x

Connorhd, probably its my setting but i just realized that in the index.php page, the posting time is shown correctly except that its AM/PM is "reversed". Messages posted in the forum (as referenced by forum_id) have the correct time, say 10:00 AM, but this appears as 10:00 PM in the index page. :-) hahaha

My server timezone is set at -04, while i'm +8GMT.

104

Re: PunBB Miniportal v1.2.x

i wonder if its using the server timezone (since thats 12 hours out on yours) i'll look into it later

105

Re: PunBB Miniportal v1.2.x

How do i add a "recent post" box to the awsome Miniportal.
I read about extern.php. but idont think my webhost allows it i get allkinds of error msg.

Any workarounds?

i tryed to add a  box in main.tpl and no problem there. but were to add the php command


<? include('http://www.zetterstrom.info/lhs/extern.php?action=new&show=10&fid=16'); ?>

another thing shouldent i see something when i type in
http://www.zetterstrom.info/lhs/extern. … amp;fid=16
in the adress bar in IE?

/ Johan

It takes a big man to cry, but it takes a bigger man to laugh at that man.

106

Re: PunBB Miniportal v1.2.x

So connorhd, i think this is due to the script using the server timezone, without taking into account the users set timezone. Any update on this?

107 (edited by AntiX 2005-07-23 02:49)

Re: PunBB Miniportal v1.2.x

yeah I found it is using the servers time zone,  I'm checking this miniportal out today wink

So far it does everything I want, its easy to work with, I can add any blocks I want, by editing main.tpl
And I can disable the lastest forum news generator from the main page, although I kind of like that feature, but to disable, I just have to rem this line: echo pun_news(1, 10, 1);
from index.php

Connorhd dude, keep up the good work

Currently I'm editing it to use includes, for example, include("blocks.php");   instead of editing main.tpl, I will just have to edit blocks.php,  and of course the same with the welcome message in the index.php,   I will just include("news.php"); for example.

108

Re: PunBB Miniportal v1.2.x

cool, btw sorry i completely forgot about the timezone problem i'll try my best to resolve it today smile

109

Re: PunBB Miniportal v1.2.x

wow that was easy its this line

$thisdate = date('l, d F Y', $cur_topic['posted']);

you could try changing it to

$thisdate = format_time($cur_topic['posted'], true);

or

$thisdate = date('l, d F Y', ($cur_topic['posted'] + ($pun_user['timezone'] - $pun_config['o_server_timezone']) * 3600));

i think

110

Re: PunBB Miniportal v1.2.x

johan wrote:

How do i add a "recent post" box to the awsome Miniportal.
I read about extern.php. but idont think my webhost allows it i get allkinds of error msg.

Any workarounds?

i tryed to add a  box in main.tpl and no problem there. but were to add the php command


<? include('http://www.zetterstrom.info/lhs/extern.php?action=new&show=10&fid=16'); ?>

another thing shouldent i see something when i type in
http://www.zetterstrom.info/lhs/extern. … amp;fid=16
in the adress bar in IE?

/ Johan

Hi. Try adding ex following in main.tpl


<pun_include "http://www.zetterstrom.info/lhs/extern. … amp;fid=16">

111 (edited by AntiX 2005-07-23 15:31)

Re: PunBB Miniportal v1.2.x

In responce to connerhd's post smile

hmmm, didn't seem to make a differentce, however the 1st code change you suggested changes the formate of the date and time to just numerals, as the last code change you suggested does not,  but for some reason its still server time(my server is an hour ahead, said 9:57am)

However, I did notice that my test post in my forums said the time was 2:57am(I never noticed this before, but this is my first time posting in the forums since the nuke conversion).  This tells me that there is something else going on :S

oh btw, (off topic) but thanks to you making this miniportal, it allowed me to quickly understand punbb's layout,  I like how I can add any function I want to the functions.php, and then call it in any document.   Currently I have created headerinclude.php (same code from your index.php)

<?php

define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';

$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
?>
       <div class="block">
           <h2><span>
<?
echo $pagetitle
?>
</span></h2>
           <div class="box">
               <div class="inbox">

and footerinclude.php

               </div>
           </div>
       </div>
<?php
require PUN_ROOT.'footer.php';

This lets me to easily create new "modules" , so for example, one could create a new page called, lol, newpage.php in the root of the punbb installation.

<?
$pagetitle="New Page";
include("headerinclude.php");
echo "here is the main content you would put";
include("footerincluce.php");
?>

I will be adding a opentable and closetable function to the functions.php
or add it to the headerinclude and footerinclude, not sure yet, but this is so that it matches with the rest of the style.
check out a test at http://antix.distortgaming.com/punbb/servers.php

* edited to include div tables to create a block for the new page

112

Re: PunBB Miniportal v1.2.x

Connorhd wrote:
$thisdate = date('l, d F Y', ($cur_topic['posted'] + ($pun_user['timezone'] - $pun_config['o_server_timezone']) * 3600));

i think

that works for me.

113

Re: PunBB Miniportal v1.2.x

I have this setup and working fine on my website, minus news actually showing up. I have specified a new forum id I just made with a test post in it, and nothing shows up. Just the welcome message. Anything I'm not doing right?

114

Re: PunBB Miniportal v1.2.x

i have no idea, try another forum id, try changing the number shown, check that pun_news is before the ?> not after it.

115 (edited by ted 2005-10-13 22:45)

Re: PunBB Miniportal v1.2.x

I am having a small but annoying issue.  First let me say that I added a small bit to my forum so that if you aren't logged in you get a page telling you that you must log in with a link to log in. 

When you go to the forum the new page displays just fine and if you click on the forum link you go right there, but if you click on the link on the news item to go straight to that topic you are redirected to the page saying that you must log in.  If you log in again you go straight to the news item topic.

After logging in the second time I searched my cookies and see that there is a cookie for username@domain and another cookie for username@www.domain.  Any idea why it is doing this?

If it makes a difference I recently changed the domain name.

116

Re: PunBB Miniportal v1.2.x

I´m using the miniportal and it´s great but how can I change how links are open in the pun_news fuction.

Let´s say I´m posting something like "bla bla" and a link "traden" and it shows up properly in the index.php (so far so good) The problem is that the link opens in _blank but I want it to open in the same window. Any ideas how to solve this?

117

Re: PunBB Miniportal v1.2.x

connorhd: any tricks to grab the news from more than one forum?

118

Re: PunBB Miniportal v1.2.x

errm
change

if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';

to

$forum_sql = 'f.id=1 OR f.id=2 OR f.id=3 AND ';

i think 1 2 and 3 being forum IDs

119

Re: PunBB Miniportal v1.2.x

Is it possible to add the latest registerd user in the index.php when using miniportal. If so..please tell me how. I´ve managed to change the code in forum.php file like this:

?>
<div id="main" class="block">
        <div class="box">
        <div class="inbox">
            <ul><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></ul>
        </div>
    </div>
</div>
<?php

But I´m no programmer som i don´t now how to add this in the index.php...anyone?

120

Re: PunBB Miniportal v1.2.x

Well, find the right place in index.php (search for some keywords) and paste that code there.

121

Re: PunBB Miniportal v1.2.x

Have a look at:
http://punres.org/doku.php?id=tutorials … line_block

122 (edited by helpme 2006-04-25 10:08)

Re: PunBB Miniportal v1.2.x

How do I add "recent news" in the sidebar?

123

Re: PunBB Miniportal v1.2.x

http://punbb.org/forums/viewtopic.php?pid=67827#p67827
lastest news punbb mod..
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

124

Re: PunBB Miniportal v1.2.x

Is it possible, i guess it is and have somone the solution.

I want to have it like this on my index.php:
Non clickable headlines, only the first 200 words displayed and then a read more link that precents the intire post, + number of comments. The comments are done in the forum, when you click on the (12) comment´s link you will be taken to the first post in the forum and there be able to add a comment to the news posted.

News 1 comes from forum id=1
News 2 comes from forum id=2

And also headlines like this:

5 latest headlines from forum id=1
5 latest headlines from forum id=2

When you click on them the post will be precented on index.php, so users can read and also comment (in the forum)

125

Re: PunBB Miniportal v1.2.x

read the extern.php... opent he file up and read the first few lines... tells ya how...

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!