326

(10 replies, posted in PunBB 1.2 discussion)

I don't know about Ludos solution.

You cannot include a local file with parameters.
Of course you can do something like this.

Rename all occurences of $_GET to $get or something in extern.php

2. Where you want to include extern.php, define an array like this:

$get = array('action'=>'active',
   'show'=>'10');

and after that include extern.php locally.
Might work.....

327

(10 replies, posted in PunBB 1.2 discussion)

gezz wrote:

Okay iv been using this method for the longest time untill my hosting provider decided to change the php.ini settings on me so that i cant use urls

Change provider wink

No, really, calling extern.php locally won't working because it needs the $_GET array which will not be available if not called via URL.

sham wrote:

i have this error. please help me resolve it... thanks in advance

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Xitami\xxx\_forums\viewtopic.php on line 363

First, see if there is maybe a ";" missing at the end of a php line where there should be one.

If that doesn't help paste here the code around your line 363 (say, 320 to 365, please not all viewtopic smile )

Just for style/redability reasons, this here

shaul26 wrote:

after add:

        $rank_pips = "";
        if($cur_post['num_posts'] > 5000) { $num_pips = 10; }
        elseif($cur_post['num_posts'] > 3000) { $num_pips = 9; }
        elseif($cur_post['num_posts'] > 2000) { $num_pips = 8; }
        elseif($cur_post['num_posts'] > 1000) { $num_pips = 7; }
        elseif($cur_post['num_posts'] > 500) { $num_pips = 6; }
        elseif($cur_post['num_posts'] > 300) { $num_pips = 5; }
        elseif($cur_post['num_posts'] > 100) { $num_pips = 4; }
        elseif($cur_post['num_posts'] > 50) { $num_pips = 3; }
        elseif($cur_post['num_posts'] > 10) { $num_pips = 2; }
        else { $num_pips = 1; }

        for($pip=0; $pip<$num_pips; $pip++) {
            $rank_pips .= '<img src="img/pip.gif" alt="" />';
        }

IMHO should be more like this :

$postct_split = array(10,50,100,300,500,1000,2000,3000,5000);
$pip_img = '<img src="img/pip.gif" alt="" />';
$rank_pips = $pip_img;
foreach($postct_split as $stars) {
  if($cur_post['num_posts'] > $stars) { $rank_pips .= $pip_img;}
  }

Saves 9 lines of code smile

330

(15 replies, posted in PunBB 1.2 discussion)

But

BenWilson wrote:

to access a forum via email only

is what I call the definition of a mailing list.
A forum is web based, has to be or it's not a forum.
I mean, how to you want to access this board by email anyway?
All you could do is wait for new posts to come or send an email to the server from time to time.

And the first part is already possible, just subscribe everywhere.

As alastc pointed out what you are looking for is a newsgroup, one that looks nice maybe.

But in order to receive emails and sort them accordingly this board would need so many extra lines of code, plus every board owner would need root access to the server or have a very kind host.

Fire Fusion wrote:

I think Textile should replace BBcode as PunBB's code of choice. BBcode is so bulky and cumbersome

Beg your pardon? wink
There are exactly 9 (nine) different BBcode tags in the standard version.
Bulky?
Cumbersome?
Limited maybe, but no way difficult.

If you are looking for something really cumbersome then I think Textile is the option. smile

No, really, why trying to have a complete html replacement?
Would be easier to actually allow at least some HTML tags than having to learn a complete new markup language smile

Plus, I always have the feeling that too much layout options don't help the readability of a board.
Once you allow people to mess around with different font sizes and so on - some of them will almost certainly overdo it.

Fire Fusion wrote:

I think it would further help PunBB's identity as a light, easy and fast message board.

I think it would make punBB at least more complicated if not slower.

332

(5 replies, posted in PunBB 1.2 troubleshooting)

No, that wouldn't make sense. Too easy to destroy the whole forum layot with a thing like that.... wink

333

(5 replies, posted in PunBB 1.2 troubleshooting)

If you mean HTML you can use the [ code ] resp [/ code ] tags, it's explained when you click on "BBCode" below

There is this one
http://www.cookdojo.com/

If that doesn't suit you why don't you use a simple CMS like easycms or nucleus and make one?

Don't thank me.
It got lost when an old computer crashed..... sad

sorry.
But maybe you'll find one in the major archives, hotscripts, php-resource and the likes.
There are scripts for almost anything.

336

(5 replies, posted in General discussion)

Andy wrote:

Why would we want to find intelligent life anyway, it'll probably just attack us tongue

From what I learned about mankind during my existence I guess it is much more likely that we would attack them - of course for no real reason as usual wink

Oh,

I know I wrote one for my girlfriend a long time ago. smile
I'll post it if I still find it and if it's still OK.....

338

(10 replies, posted in Feature requests)

Yes, if there is code why not post it?
If it's not too long smile
Or, if you have the possibility (= a server) you can make a download file on there.
I think there are a few people who'd like to have that.

339

(10 replies, posted in Feature requests)

Congratulations.
Would you mind sharing it?

Not that its bad asking for help, but I think a forum like this should be about taking and giving wink

keyes wrote:

Yes you must get a Google API key and respect Google Maps API terms of use (i.e: no commercial sites).

If the map run in Satelite mode you can see evrywhere, i can view my home who is located in a litte city in France.
Road map are only for US, UK and Japan. Perhaps that Google will extend its service to others country.

Sorry, what I meant was what you see on http://www.google.com/maps

You can search for cities there but cities are marked only in fery few regions of this planet.
Of course you can see all towns and villages on the satellite pics but not on the maps.

faax wrote:

my city is un-located big_smile there is no satelite to find Maglaj city big_smile

No,
I think it's just that Google didn't enter it in their catalogue.
Have a look at their world map, it's basically the US and the UK.
All the rest has no cities entered.

342

(15 replies, posted in PunBB 1.2 discussion)

alastc wrote:

Whilst I agree that receiving emails to post is not a welcome feature (to me at least - why not create a newsgroup?), it would be nice if the email alerts that are sent out included the post itself?

This can be done quite simply but on a large board it could cause considerable email traffic.

Open post.php and go to line 287 (or around there)

Change

if ($cur_subscriber['notify_with_post'] == '0')
pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]);

to

if ($cur_subscriber['notify_with_post'] == '0')
pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][3]);

If I am not completely wrong that should do the trick but I haven't tested.

343

(15 replies, posted in PunBB 1.2 discussion)

BenWilson wrote:

Is there a way in PunBB to email posts to the forum?

No, and it is not possible to do it only with a mod


BenWilson wrote:

This would allow some members to read and respond without visiting the forum.

But what is the point  to post without seeing the forum? Sounds like shooting in the dark to me.


BenWilson wrote:

As I understand, this is possible in that other BB.

Oh, that one. smile

I'm not so sure.

I'll tell you what you'd have to do on a *NIX system

1. Write a script that would parse an incoming email for the address, a username/password pair, the text and the forum ID where to put that text in.
Then connect to the database, check the User ID and permissions, then stuff everything to the appropriate place.(ie the right tables in the database)

2. Set up an alias for sendmail/postfix for a specific mail user that will pipe all incoming mails to the above mentioned script

3. Set up a virtual user in sendmail/postfix connected to the alias in 2.

4. Hope that everything works fine.

Short version:
No, I don't think it can be dome easily. smile

344

(6 replies, posted in PunBB 1.2 troubleshooting)

Never mind, I know the story.
Once you get stuck with a problem for too long you just keep staring at your files and don't see the obvious solution anymore.
In those cases I just go for a quick swim, that alwyas helps.
Depending on your region you should maybe look for something else to do though smile

I knew you'd say that smile

What exactly is it that you don't like?
It's just that I'm more a programmer than a designer as with you maybe the other way round.
I am always willing to learn from experts so go ahead.

Moreover, this is is my first really and absolute privat site.
All the others have to look serious/standard /boring because clients/users require it.
So I maybe went a bit too extreme smile ...

346

(6 replies, posted in PunBB 1.2 troubleshooting)

garyd wrote:

is it possible that one of my forums isn't id 1-8?
Shure it is smile

garyd wrote:

if so how do i find the forum's id?

thanks for any help - garyd

That's very easy.
Just go to your forum index page where you see the list of all forums.
Move your mouse over each link to the forums and in teh browser status bar at the bottom you will see a link like
http:/blahblah/myboard/index.php?fid=66

Where "fid=66" is the respective forum id.

No, it is not.
You don't get a roadmap everywhere, that's right.
But I live on a tiny little rock in the ocean and I can still zoom up to a level where I can place the cursor exactly where my house is.
smile

My god!!!!!

This is soooo cool!
smile

It should be noted that you have to get your own google API key and enter it in the admin->options interface of your board (it is mentioned there but you have to know smile )

If you apply for an api key make sure you give the path to your board, noot only your server root
(http://www/myserver.com/punBB/) , the key is valid only for this directory, not subdirectories.
Tok me a while to figure out.

So, now I'll go and play with it smile

I made up a site with some of the scripts I wrote over the past years, I'm planning to extend it but it's a lot of work.
Next thing will be a collection of code snippets rather than complete scripts.
There are thousands of problems that I had to solve and more than once I found out later someone else had already done it before. i just couldn't find that solution when I needed it.
So I think it would be nice to have a problem-solving catalogue that lists snippets for all (or many) of these issues that one faces every day.

Well, first I'll have to see how this all works...

http://www.script.gr

350

(28 replies, posted in Feature requests)

This is not my day. Sorry.

The real way is:

Change line 204 (or around);

$username .= ' <a href="#" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, \'anylinkmenu'.$tpct.'\')">CLICKME</a>';

to

$username .= ' <a href="#" onClick="document.location.href=\'profile.php?id='.$cur_post['poster_id'].'\'" onMouseover="dropdownmenu(this, event, \'anylinkmenu'.$tpct.'\')">CLICKME</a>';