i'd like to only approve posts that have links/images in them

here are the options u might want

profile link
signatures
guest posts
users with less than 50 posts
all user posts

that maybe too many options, but just throwing out ideas, i've thought about of hacking rel=nofollow into my forums for quite some time (easy hack into parser.php, but i agree it probably should be part of the core)

53

(0 replies, posted in Feature requests)

delete

I want to rename the file so the spam bots cant find that page so their script wont work on my site

Sure they could rewrite their script but are they really going to do that when they can just go to someone elses PunBB forum?

I'm tired of spammers registering, I have email verification on, so I know its spam bots because they register and never post



a better solution might be to require a valid "TOKEN" when someone registers, the token could be time limited also

heres a page that talks about that (go to the end of the article)
http://shiflett.org/articles/foiling-cross-site-attacks

55

(52 replies, posted in PunBB 1.2 discussion)

WOW these are even cooler than the Yahoo smilies smile

56

(11 replies, posted in PunBB 1.2 discussion)

is this still a prob in IE7 RC1 ?

If we have hacks or little edits to the code, by the GPL we have to share them dont we? Even if its simple crap like editing in a custom copyright or header?

I plan to make a minor hack to one of my forums soon and was wondering the best way to make that code available. Should I put a small link at the bottom of the page that says: mods&hacks and links to a page with the code for my hacks? I'm looking for an elegant way to do this and thast the best method or idea I have. As far as I know most sites dont do this for any other web apps they edit when they do have to make edits to it. Personally Ive never seen any sites/forums that share code when u konw they edited something opensource, sure sometimes u see something at the bottom by the copyright about what mod/plugin they use for some things on PHPBB but thast only like maybe 5% that do that and then that leaves out all the hacks people are doing.

i plan to put a rel="nofollow" on that link and make that page like static HTML or something with some other stuff to protect it from being indexed by search engines.

does anyone have any better suggestions? smile

58

(68 replies, posted in PunBB 1.2 discussion)

sirena wrote:

The only reason I'd consider removing the copyright and/or 'Powered by punBB' is for 'security by obscurity' reasons.

just make an image with the copyright info and give it a obscure file name and empty alt="" and you could also use rel="nofollow" for the link it wont get picked up for security reasons also

Its still a valid method incase people still want to use it, I might try it out on one of my forums. although spammers still seem to register on some sites just to get a few views for 1 link.

Here are other suggestions and kinda go into other areas: make the copyright info at the bottom a JPG, so people might not find your forum is using PUNBB with google, u might also put in a generic CAPTCHA but thats been discussed several times, i think Captcha is only good for Guests and not registered users.

(edit: i didnt realize this was the featured request forum, I was searching about this and added my 2cents to the issue) I really dont care about having this option in PunBB, personally I think its ok for people to just hack this fix in wink

60

(69 replies, posted in News)

Nevethir wrote:

1.3 needed not 1.2.12 hmm

thats not really fair man

he was able to fix a security hole pretty fast, I'll be willing to wait for 1.3, besides isnt he like the only active developer for PunBB

This is my next goal, is to somehow work in a Submit News option, I'm not sure if a plugin or mod has been made for this has been made, if so let me know, if something close has been done, post it and maybe I can modify it a little to do this

Heres my ideas:
Has to be a forum that allows guests to make comments (if you want guests to submit news), so you would create a forum called: News Submissions or something, you might change the options to not let anyone post replies (until the Admin or Moderater OKs it)

Although my thought is that if you disable the "read forum" option then it disables the option for someone to "Post topics" to it. So there would have to be an mod/hack to make just that forum "hidden" so that you dont have people making news submissions that everyone sees and ones that might have bad stuff in them and having a whole category full of them.

However if there was some way to make the "Post new topic" available from say your home page (not the forum index) and work with that hidden forum.

Also there'd have to be a way for admins/moderators too see how many new unapproved news submissions there are so they can approve (it then gets possibly moved to another forum called "news" and allows people to make comments to it. It should also allow the admin/moderator to edit the news submission incase they need to. But if they disapprove of it the item gets deleted.

Just ideas on how something like this should work. I'll see if anyone posts any links to something similar and if not I'll probably attempt to do this sometime later this week or so. I'm probably gonna just let those ideas sink in my mind a little more and see what others think of it wink and if its the best way or not

Wow this rocks smile

And to the dude that just wanted the first 10words, modify this snippet of code and work it into whats here:

<?php


//this basically allows so many words in a paragraph
function charLimit($string, $length = 10, $ellipsis = "...")
    {
    $words = explode(' ', $string);
    
    $curindex = 0;
    $wcount = 0;
        foreach($words as $value)
        {
            $wcount += strlen($value)+1;

            if($wcount>$length-strlen($ellipsis))
            {
                break;
            }
            $curindex++;
        }
    return implode(' ', array_slice($words, 0, $curindex)) . $ellipsis;
    }
?>

I got that snippet off of php.net somewhere awhile back, their site is helpful, much like PunBBs forum smile

I found a thread that kinda had what I wanted
http://punbb.org/forums/viewtopic.php?id=8786

So I modified that along with some other code others helped me with on the random profile and here's what I got, which is what I wanted smile


<?php
$punbb_path = $_SERVER['SCRIPT_FILENAME'];
$punbb_path = './punbb/';

define('PUN_ROOT', "$punbb_path");
require PUN_ROOT.'include/common.php';

define('PUN_TURN_OFF_MAINT', 1); // if forums go down the site will not
define('PUN_QUIET_VISIT', 0); // update last visit when outside of the forums
?>

<?
if($pun_user['id'] > 1)
{ 
$query = "SELECT id, username, last_visit FROM ".$db->prefix."users WHERE id='".$pun_user['id']."'";
$result = $db->query($query) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());

$data = $db->fetch_assoc($result);

if ($pun_user['show_avatars'] != '0')
        {
        $avatars_dir="punbb/img/avatars/";//avatars are located here
        
            if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.gif'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.jpg'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.png'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '';

echo $user_avatar . "<br />";
echo 'Welcome to ----, <strong>'. $data['username'] . '</strong>.<br />';
echo "Last visit: " . date('M j, Y h:i:s a' , $data['last_visit']) . "<br />";
}
else
{// show login forum
    echo "Welcome to ----, Guest.";
?>


<!--update urls-->
<form id="login" method="post" action="/punbb/login.php?action=in" onsubmit="return process_form(this)">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="<?php echo $_SERVER['SCRIPT_NAME'] ?>" /><!-- remove that if you dont want redirect to this same page, it will go to forum index instead-->
<label class="conl"><strong>Username</strong><br /><input type="text" name="req_username" size="25" maxlength="25" tabindex="1" /><br /></label>
<label class="conl"><strong>Password</strong><br /><input type="password" name="req_password" size="16" maxlength="16" tabindex="2" /><br /></label>
<p class="clearb">If you have not registered or have forgotten your password click on the appropriate link below.</p>
<p><a href="/punbb/register.php" tabindex="4">Not registered yet?</a>  
<a href="/punbb/login.php?action=forget" tabindex="5">Forgotten your password?</a></p>
<p><input type="submit" name="login" value="Login" tabindex="3" /></p>
</form>
<?php
}
?>

Has anyone create something like this?

http://img106.imageshack.us/img106/4479/punbbuser5aa.gif
Basically it just shows your avatar, name, other info about you if you are logged in and if not shows the Welcome guest and register link. Perhaps a login box would be better though?

now for the search code

<p>
Forum Search - <a href="http://FORUMS.YOURSITE.COM/search.php">more options</a><br />
<form id="search" method="get" action="FORUMS.YOURSITE.COM/search.php">
<input type="hidden" name="action" value="search" />
<input id="author" type="hidden" name="author" size="25" maxlength="25" value="" />
<input type="hidden" class="conl" value="-1" />
<input type="hidden" id="search_in" name="search_in" value="all" />
<input type="hidden" name="sort_by" value="0" />
<input type="hidden" name="sort_dir" value="DESC" />
<input type="hidden" name="show_as" value="topics" />
<label class="conl">Search<br /><input type="text" name="keywords" size="40" maxlength="100" /></label>
<input type="submit" name="search" value="Submit" accesskey="s" />
</form>
</p>

Simplier than I thought, I just had to put in those hidden fields, which you can feel free to edit to change the results of your search, also be sure to change the paths of these to whatever yoursite is smile

Yeh I knew i could do it that first way but that website I linked to showed it wasnt the most efficient way, but thanks for figuring out that avatar stuff man smile I learned quite a bit from your code too wink

I think you were running some avatar mod/plugin so I had to edit mine since my install is rather plain, I changed the layout some to my liking and fixed the date on it, but if someone is running PunBB without avatar plugins/mods this is some sample code, I replaced the die() also

<p>
Random Profile<br>
<?php
//random profile
$query = "SELECT id, username, num_posts, registered, location FROM ".$db->prefix."users WHERE username!='Guest' ORDER BY RAND() LIMIT 1";
$result = $db->query($query) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());

$data = $db->fetch_assoc($result);

if ($pun_user['show_avatars'] != '0')//$pun_config['o_avatars'] == '1' && 
        {
        $avatars_dir="forums/img/avatars/";//avatars are located here
        
            if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.gif'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.jpg'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($avatars_dir.'/'.$data['id'].'.png'))
                $user_avatar = '<img src="'.$avatars_dir.'/'.$data['id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '';


// echo "<br />",$query,"<br /><b>Id: </b>",$data['id'],"<br /><b>Username: </b>",$data['username'],"<br />","<br />";

//echo "<b>Id:</b> " . $data['id'];
echo "<strong>" . $data['username'] . "</strong><br />";
echo $user_avatar . "<br />";
echo "Posts: <strong>" . $data['num_posts'] . "</strong><br />";
echo "Registered on: <strong>" . date('M j, Y' , $data['registered']) . "</strong><br />";
echo "Location: <strong>" . $data['location'] . "</strong>";

//echo "<b>Avatar:</b> <img src=\"forums/img/avatars/" . $data['avatar'] . "\" alt=\"" . $data['avatar'] . "\" />";
//echo "<b>Avatar: </b> " . $user_avatar;
?>
</p>

Now all thats left is a search box and I think i think i know how, I'd still like to figure out to do it the efficient way but I guess its not that vital. I plan to learn MySQL soon. This punBB rocks man smile I've got almost everything I need for a simple CMS

I attempted to make a random profile but its not working, the code is complicated kind of but its a efficient random picker (which I found at- http://jan.kneschke.de/projects/mysql/order-by-rand/ )

//random profile
$result = $db->query('SELECT id, username, num_posts, registered, location FROM '.$db->prefix.'users AS r1 JOIN (SELECT ROUND(RAND() * (SELECT MAX(id) FROM users)) AS id) AS r2 WHERE r1.id >= r2.id ORDER BY r1.id ASC LIMIT 1')
 or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="http://mysite.com/profile.php?id='.$data['id'].'">'.pun_htmlspecialchars($data['username']).'</a><br />Total Posts: '.$data['num_posts']."<br />Member since:".$data['registered']."<br />Location:".$data['location']."<br />\n";
}

Unfortunately it isnt working sad and Im not sure why I'm sure someone that knows Mysql can figure it out, anyway this is a good starting point

Yeh I'd like to see a Limbo intergration, limbo doesnt have its own forums and is a nice CMS so the 2 would go great together smile

69

(5 replies, posted in Feature requests)

Elzar wrote:

How about 26 posts?

yeh maybe if that number was configurable. I just want to hide the Instant Messenger info from anyone but a guest, although if you could require a post count number that would prevent some lamer from signing up so he can get the list of email addresses and such.

70

(3 replies, posted in Feature requests)

If you could check a box for this when you make a reply to a post that would be cool

also if you could set it as your default option in your profile to subscribe to all posts you create and reply to.

is the full script? I've been doing a search for this plugin and this is the only post where I see a download that and I dont know french, so I wouldnt know how to find it on your site if u have it there

I'd like an option to show a random profile, not any sensitive information, just their

avatar
nickname
total posts
join date
location

I've seen a php-plugin do that so Im sure PUNbb can cuz its better wink

Also I'd like a forum search box that would work from a front page would be cool too

73

(5 replies, posted in Feature requests)

It'd be a nice feature to hide the userlist from anyone not a guest or anyone with less than 25posts.

Also you'd have to hide any email/instant messaging links in posts also

As it is now, any bot or person can just harvest up email addresses, instant message names and such.

I think this would be a good feature smile

74

(0 replies, posted in PunBB 1.2 troubleshooting)

delete

I thought this might be a neat feature, afterall even if you require email address and it that its valid, its easy for Bots or spammers to get around that but using a turing number would prevent that. You could even make it required for registration, perhaps

Incase you dont know what a Turing number is, its when a site has a image with characters and a strange background and the characters are all wierd looking, like some are inflated, others warped or at angles, its like that so Bots and OCR programs cant get around them. The user is required to input those characters in a form and they must match or else the form is not valid.