26

(33 replies, posted in News)

Nice little update wink

Why not just use the date(); function in the footer? I guess both are good but date(); is much simpler big_smile
For the time your could use time(); then I'm 99.7% sure Rickard made a function that turns time(); to correct time formating, format_time(); or something like that, you'd have to check in functions.php.

28

(12 replies, posted in General discussion)

I'll stick to linux smile

29

(3 replies, posted in PunBB 1.2 show off)

Wow, I like it, there's something special about the design, I can't quite tell what it is, but it just looks really good!
Great Work!

We'll you get the user's id simply by hovering your mouse over their username, and look at the link it's giving.
For example, while hovering on your username I got "http://punbb.org/forums/profile.php?id=1184". 1184 would be your id.

Awww, thanks Frank smile

Did you even try it yet sad

http://pierrisme.com/AMP_AuthorChange.zip

5 Queries total, works fine smile
Tested a little on my server, everything went fine.
I didn't test with username with ' and " characters, tell me if anything bad happens, I'll update it for you.

Have fun with this plugin.
Simply unzip and upload in your plugin folder.

Alright, I'll start working on that shouldn't take long..

That's actually pretty easy to do:
I could do a plugin that changes all posts/topics to the user with the id of your choice.

Box #1 : Id of the person you want to delete.
Box #2 : Your id (2) or the id of the person you want to give the posts to.
You click submit and 1 query does it all.

Is that what you need?

Yeah, mod was created for 1.2.5.

37

(2 replies, posted in PunBB 1.2 discussion)

Did you rename lock6ye.gif to lock.gif?

Anyways, since the image isn't loading it should be saying such as "Lock" since I added the "alt" tag. Can you see the text "Lock" where the image should be located?

Well, I want to keep the parser for all posts except for the posts made in the forum with the id 6.

I need to remove the parser if the current post is in a certain forum (id = 6).
I tried a few things but nothing seemed to work, any idea on how this could be done?

if ($cur_post['forum_id'] != '6')
Parse

Something a bit like this, but that dosn't work.

Thanks in advance!

40

(7 replies, posted in PunBB 1.2 discussion)

@Connorhd: Ty, I was 99.9% sure it needed an alt tag smile now I'm 100% sure.
@Paul: You are right, I looked up avatar properties on firefox and it said "blank" I thought it meant there was no alternate text.. I looked in viewtopic.php and there really is an alt="". My bad..

41

(3 replies, posted in Programming)

Rumors say that md5 is un-decryptable.

Now, after a few hours of trying to figure out how md5 worked, I came up with this idea.

http://pierrisme.com/md5.php

I first tried to copy currently existing md5 decryptor script, of course, none of them worked, simply because md5 IS undecryptable.

My system does is a decryptor, but it's the probably the closest anyone came to creating a working decryptor.

It uses a database, it's actually quite simple..

I made a script that added thousands of words to the database. I then bumped into another problem..

I never thought, for example, aaa, AAA, aAa, AaA, Aaa, aaA, aAa, ect, would give different values.

It would be way too complicated for me to create a script that would add all of those into a database, so right now, in database there is all 3 letters word, in caps and in non-caps and few 4 letter words, again in caps and in non-caps.
For example you will find:
HI and hi, but not Hi or hI.

I also added an encryptor onto the page, if you want to encrypt a word, you simply need to type in the word into the correct field.

Enjoy the encryptor, all comments+suggestions are accepted! (hate posts?)

42

(7 replies, posted in PunBB 1.2 discussion)

I know PunBB is aiming to have a perfect XHTML and I noticed a little something today.

It's not a very big problem, but when a use has an avatar and the avatar is showing, it dosn't have an alternate text. (alt="")

$username = pun_htmlspecialchars($pun_user['username']);
if (substr($username,-1,1)=='s')
    $username .= "'";
else
    $username .= "'s";
echo '<img src="avatar1.gif" style="width: 100%; height: 100%" alt="'.$username.' avatars" />';

The script simply ads a "'" if the names ends with a "s" or a adds "'s" if the name dosn't end with an "s".
For example:
ultime: ultime's
Rats: Rats'

As I said, it's nothing big, but it's one step closer of having a perfect XHTML score..

Thanks for reading,
Pete

43

(5 replies, posted in PunBB 1.2 discussion)

Works great, thanks, I was going to create a long sql query for that! $cur_posting['id'] is quite smaller.. smile
Thanks again!

44

(5 replies, posted in PunBB 1.2 discussion)

This works but only for topics, I tried before, I would need to do it like this: if the post is being posted inside a topic that is inside the forum 5, then to not higher post count.

Right now:
Topics: not credited
posts: credited

Alright, I want to make a forums that users are not credited with posts when posting in it.
In this example, users are not suposed to be credited when posting in forum with id 5.

I tried
if ($fid != 5) {
$db->query ... num_posts=num_posts+1
}
if ($fid == 5) {
$db->query ... num_posts=num_posts
}

But that dosn't seem to work. Any idea how it can be done?

Thanks in advance!

Connorhd wrote:

you can do this simply with just the css, by setting a background on the new post indicators

Are you sure you can do this with the sticky icon too?

It looks like the following:

http://img71.echo.cx/img71/8197/icons4md.jpg

First, download these two images and put them in the folder where your forum is located.
Rename them to:
lock.gif : http://img71.echo.cx/img71/4403/lock6ye.gif
sticky.gif : http://img71.echo.cx/img71/1713/sticky2sl.gif

Open up viewforum.php and find:

else
        {
            $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }

Replace with:

else
        {
            $subject = '<img src="lock.gif" alt="lock"> <a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            $icon_text = $lang_common['Closed icon'];
            $item_status = 'iclosed';
        }

Find:

if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

Replace with:

if ($cur_topic['sticky'] == '1')
        {
            $subject = '<img src="sticky.gif" alt="sticky"> <span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

Save viewforum.php and upload!

That's it you're done.

- ultime

almost_there wrote:

How can I fix this so a certain user group won't see the ads?

If you want only guests to see

if ($pun_user['is_guest']) {
What ever needs to be showed to users, echo it here.
}

If you want all users to see the ads, but not you add:

if ($pun_user['username'] !="YourUseRNaMe") {
What ever needs to be showed to users, echo it here.
}

scottywz wrote:

Also, your HTML isn;t valid XHTML 1.0 strict: element names are case-sensitive (i.e. <option> and <OPTION> are 2 different things). Sorry about the triple post.

I don't really care if the html is right or wrong, as long as it works smile

You can fix it if you want..

It's a simple database query..
Didn't test it, should work..

<FORM action="<?php print ($PHP_SELF); ?>?action=setstyle" method="post">
<SELECT name="styledrop">
<?php
$result = $db->query('SELECT * FROM '.$db->prefix.'table swzc_styles') or error('ERROR..', __FILE__, __LINE__, $db->error());

while ($styles = $db->fetch_assoc($result))
{
    echo '<option value="'.$styles['name'].'">'.$styles['name'].'</option>';
}
?>
  </SELECT>
<INPUT type="submit" value="Send">
</FORM>