If you want to remove all colors from all posts you should add a line similar to the above in viewtopic.php but I think in the long run it is more efficient to remove the tags in the database.

Frank H wrote:

I suppose it's because IP's aren't foolproof in any way to rely on for security,.

Yeah, sure.
I didn't say it would be 100% secure, but what else can you do?

Frank H wrote:

and several legit users can have the same ip if they're using the same proxy....

OK, but would they fire 200 requests a minute? All together?
smile

Frank H wrote:

The only thing I can think of is image verifier, or a textual one (but those are easier to get around through scripting) ...

I thought this attack was caused by simple http requests, nothing with registration. In that cases images don't help...

After all, I think if you block requests from the same IP with more than X requests a minute (which means you can flush your IP collection quite often:) ) then it doesn't hurt and gives some extra security.
Of course there is always a way to hack a system. Always. The question is just how much effort one would take to attack a target...
I don't want to hurt anybody here but none of us runs cia.gov or whatever smile so I guess most of us will have to deal with those stupid little scriptkiddies, and their means are normally quite limited.

No, the way the query is done this will not work.
You'll have to mod the whole thing.
I guess there are more people out there who'd like to have it (me amongst them smile )

No, don't think so.
How should the program know if you left the field blank because you don't care about its contents or if you explicitly want to have entries with nothing in this field?
I guess fo this you'd need an extra function...

If you want to have something that can be integrated in punBB (which means it has to be compatible with any system) then I guess there is no way around IP logging.
This still doesn't help much against DDOS attacks but then again - nothing helps against those.
To shut up your average script kiddie I guess it is OK to block requests that exceed a certain frequency.
Why don't you like IP logging?

Try

$message = ereg_replace("\[color\=[^]]+\]","",$message);
$message = ereg_replace("\[/color\]","",$message);

instead of

$message = ereg_replace("\[color=[^\]]+\]","",$message);
$message = ereg_replace("\[/color\]","",$message);

That works

Here is something that might work.
Didn't test it so...

in post.php,  around line 145
After

$message = pun_linebreaks(pun_trim($_POST['req_message']));

try

$message = ereg_replace("\[color=[^\]]+\]","",$message)
$message = ereg_replace("\[/color\]","",$message)

and if you also want to strip the code color in the subject go to line 85 or around there and find

$subject = pun_trim($_POST['req_subject']);

an after that, write

$subject = ereg_replace("\[color=[^\]]+\]","",$subject)
$subject = ereg_replace("\[/color\]","",$subject)

That way no color code will be entered at all anymore, but the old stuff is still there.

or make a very simple php page like

<?php echo "Hello" ?>

and name it something.php4, or
something.phtml and see if one of those work.
If it does then it's their webserver settings.
In that case either you can convince them to change them or you'd have to rename all files to the ending tat works and change all links in the files accordingly. Lots of work...
or change provider.

384

(28 replies, posted in Feature requests)

Rod wrote:

1. it doesn't work ... when I install the option inside admin_options, I have the checked box, the "clickme" links appears, the layers are created at footer ... but nothing happens when I "click"

Do the popups show up?
Then it's OK, the "click me" is a placeholder more or less, don't know if something special should happen on click...
But if the popups do not show up please consult your javascript debugger and tell me what it says.
Do you have both files downloaded and installed?

Rod wrote:

Another suggestion : when you choice "IN", the "info user" disappears like "no" > otherwise the popup has any interest smile

Don't know what you mean.
Chose "IN" where?
And what do you suggest to happen there?

Rod wrote:

May the force be with you ... I let you my code of viewtopic.php

Looks fine. I guess it's more the header.php or the files not where they belong.

385

(28 replies, posted in Feature requests)

Rod wrote:

I test it this evening !!! smile It would be cool smile

Is there restrictions by groups ? For example I would like guests see nothing ...

It behaves exactly like the "normal" admin option "User info in posts".
I think guests see verything if that option is checked so they will see everything with this mod as well.

This has nothing to do with what you wanted to have originally anyway... wink

386

(28 replies, posted in Feature requests)

OK,
I finished this one.
What it does now is it adds a third option to "Show user info" in the administration
So, instead of "yes" or "No" you can now choose "In Foldout menu" and you will see the same information there.

However, the CLICK ME doesn't look nice, maybe you have a nice idea for this.

##      Description:  This mod needs the Anylink CSS Menu.
##                    Please download it here:
##                    http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

##                    It adds a foldout menu next to the poster's name
##                    in viewtopic.php.
##                    This menu contains the information that is usually only visible 
##                    when Show INfo is set to "1" in the "Options" administration. 
##                    For the menu there is now a new radiobutton in the administration 
##                    that allows to display this foldout menu instead.
##                    So, to activate this module you must go to the OPTIONS administrations
##                    and set "User info in posts" to "In Foldout Menu".
##
##   Affected files:  header.php
##                    viewtopic.php
##
##       Affects DB:  No
##
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

#
#---------[ 1. DOWNLOAD ]------------------------------------------------------
#

http://www.dynamicdrive.com/dynamicindex1/anylink.css

#---------[ 2. MOVE FILE TO ]---------------------------------------------------
#

your installation folder

#
#---------[ 3. DOWNLOAD ]---------------------------------------------------
#

http://www.dynamicdrive.com/dynamicindex1/anylink.js

#
#---------[ 4. MOVE FILE TO ]---------------------------------------------------
#
your installation folder



#
#---------[ 5. OPEN ]---------------------------------------------------
#

header.php

#
#---------[ 6. FIND (line:76) ]---------------------------------------------------
#

<script type="text/javascript">

#
#---------[ 7. BEFORE, ADD ]---------------------------------------------------
#

<!-- MOD USERINFO  -->
<link rel="stylesheet" type="text/css" href="<? echo PUN_ROOT?>anylink.css" />
<script type="text/javascript" src="<? echo PUN_ROOT?>anylink.js">
/***********************************************
* AnyLink CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<!--// MOD USERINFO  -->



#
#---------[ 8. OPEN ]---------------------------------------------------
#
viewtopic.php


#
#---------[ 9. FIND (line:183) ]---------------------------------------------------
#

$post_count = 0;  // Keep track of post numbers

#
#---------[ 10. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
$tpct = 1;

#
#---------[ 11. FIND (line:201) ]---------------------------------------------------
#

    $username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';

#
#---------[ 12. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
  if($pun_config['o_show_user_info'] == '2')
    $username .= ' <a href="#" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, \'anylinkmenu'.$tpct.'\')">CLICKME</a>';
 //END  MOD USERINFO
  
#
#---------[ 13. FIND (line:250) ]---------------------------------------------------
#

        $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
    }
#
#---------[ 14. AFTER, ADD ]---------------------------------------------------
#

// MOD  USERINFO    
    elseif($pun_config['o_show_user_info'] == '2')  {
      if ($cur_post['location'] != '')
      {
        if ($pun_config['o_censoring'] == '1')
          $cur_post['location'] = censor_words($cur_post['location']);
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']).'</a>';
      }

      $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']).'</a>';

      if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.$lang_common['Posts'].': '.$cur_post['num_posts'].'</a>';

      // Now let's deal with the contact links (E-mail and URL)
      if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
        $user_info[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
      else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
        $user_info[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';

      if ($cur_post['url'] != '')
        $user_info[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
    $mod_info[] = array($tpct, $user_info);
    unset($user_info);
    }
    $tpct++;
// END MOD  USERINFO    

  
#
#---------[ 15. FIND (line:438) ]---------------------------------------------------
#

$footer_style = 'viewtopic';
  
#
#---------[ 16. AFTER, ADD ]---------------------------------------------------
#

// MOD USERINFO
if($pun_config['o_show_user_info'] == '2')  {
  foreach($mod_info as $posterinfo) {
    ?>
<div id="anylinkmenu<?php echo $posterinfo[0]?>" class="anylinkcss postleft">
  <?php
    foreach($posterinfo[1] as $udata) {
  echo $udata."\n";
  }
  ?>
</div>
<?php 
    }
  }

  
#
#---------[ 17. OPEN ]---------------------------------------------------
#

admin_options.php

#
#---------[ 18. FIND (line:344) ]---------------------------------------------------
#

                    <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong>   <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>

#
#---------[ 19. CHANGE TO ]---------------------------------------------------
#
                    <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong>   <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>   <input type="radio" name="form[show_user_info]" value="2"<?php if ($pun_config['o_show_user_info'] == '2') echo ' checked="checked"' ?> /> <strong>In Foldout Menu</strong>

387

(28 replies, posted in Feature requests)

Rod wrote:

We have 2 solutions.
1. Put all the datas AFTER the footer : indeed the layout is called by its number so it can put it everywhere ... I'm think it's because the div is inside we have this bug.

Sure this works?

EDIT:

Yeah, this works!!
Now:

Rod wrote:

In fact, we could put the entire profile inside, it's not a problem.

It is a problem. It is causing a lot of traffic overhead because the data will be always transmitted, visible or not.
Don't you think it would be good to limit the entries on 3 or 4 really important ones?
And would you please suggest what this may be?
Like f.e.
POSTS
REGISTERED
CITY/COUNTRY
WEBSITE

Or what do you think?

Then I'll set everything up and we have a mod smile

388

(28 replies, posted in Feature requests)

Rod wrote:

All works fine for me !!!

Lucky you smile

It looks really shitty in Firefox 1.0.4 though.

And what do you mean with I can put everywhere?
I guess it has to be somewehere close to the link because there is a loop in the script where I have to put everything.

Can you take a look with Firefox and maybe tell me *where* to put everything?
Then I could easily integrate it.

389

(28 replies, posted in Feature requests)

This is a sample page:
http://www.gotohellas.de/puntest/testoutput.htm

It's a saved version of some viewtopic.php output but you will see what I mean...hope you can solve this.

Forgot to mention:
I put the css under the "Click me"string, in case you didn't guess it smile

390

(6 replies, posted in General discussion)

Erm... dunno wink

391

(28 replies, posted in Feature requests)

This one has a problem:
It does not appear in front, it always stays behind some other elements and it does not listen to the z-Index.

I don't know if this can be solved or if it is an issue with the punBB css.

Any other idea? wink

392

(6 replies, posted in General discussion)

In Fireworks, you can make your logo on a transparent background and then save as PNG, transparency set to alpha channel.
That works perfectly in Firefox/Mozilla and the likes but rumours have it that the results in IE are maybe not soo good, depending on the version

Oh.

Go to line 46.

Change

$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username'  && $_GET['sort_by'] != 'registered'  && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by'];

to

$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username'  && $_GET['sort_by'] != 'registered' && $_GET['sort_by'] != 'last_visit' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by'];

Now go to line 88:

            <option value="registered"<?php if ($sort_by == 'registered') echo ' selected="selected"' ?>><?php echo $lang_common['Registered'] ?></option>

After this, add

            <option value="last_visit"<?php if ($sort_by == 'last_visit') echo ' selected="selected"' ?>><?php echo $lang_common['Last visit'] ?></option>

Done.

394

(28 replies, posted in Feature requests)

From the programming point of view it is absolutely the same.
Even more, the behaviour can be changed in seconds between "Click" and "mouseover"...

395

(28 replies, posted in Feature requests)

I played around with that a bit.
The problem for me was that once the popup opened and closed again it left a "hole" on the page.
Alternatively I opened a popup layer next to the image but it stayed there when I scrolled down, so I got annoyed by all this and gave up smile

I hate all these cross browser issues so for years I stayed away from css, just cared about my code and left the design to the designers.
Unfortunately, this habit didn't make me a CSS guru smile

Anyway, if you have a snippet with a popup layer that you can show and hide without destroying the rest of the layout and that behaves like you expect - post it and I'll do the rest.
Fair deal?

396

(28 replies, posted in Feature requests)

I had a look at the JavaScript they are using and it looks way too big for the simplicity punBB offers.
Also it's vBulletin code which I suppose is not GPLed wink
I'm sure it can be done with less code though - but still requires some JavaScript.
Interesting, maybe I'll give it a try later on.

Here is something I tested that definitely works:

http://punbb.org/forums/viewtopic.php?pid=48883#p48883

OK,
sleeping helps.

I tested this and it works:

include/functions.php, line 137 (on my install, might sightly differ due to installed mods)

Find

    $pun_user['is_guest'] = true;
}

Replace with:

    $pun_user['is_guest'] = true;
  if(!ereg('login\.php', $_SERVER['SCRIPT_FILENAME']) && !ereg('register\.php', $_SERVER['SCRIPT_FILENAME']))  
    Header('Location:'.PUN_ROOT.'login.php'); 
}

Notes:
You can leave out the part

 && !ereg('register\.php', $_SERVER['SCRIPT_FILENAME'])

but then nobody can register on your site anymore

Instead of

Header('Location:'.PUN_ROOT.'login.php');

of course you can put any url you like.

What went wrong was that I forgot that you have to set the cookie first... sad
I don't know if set_default_user() before the Header() statement works but I'll find out.
Since it is getting very late down here I'll give it to you tomorrow. Sorry.

Funny.

Exactly the same thing has been asked by somebody else today.
And I tried to answer it, I do hope the code works but I still haven't tested myself.
Very minor change to so anyway:

http://punbb.org/forums/viewtopic.php?id=8298