You'd have to change some queries, add some code similar to the subject handling code, and add a copy of the subject field. Enough to do
2,602 2006-02-07 16:14
Re: user register dates all wrong (14 replies, posted in PunBB 1.2 bug reports)
To me this means I find where the servers are located, in my case.. Utah (-7 MST), and set accordingly.
I think this has been suggested to Rickard in the past, but PHP can determine the timezone offset for the forums: couldn't this be included at install to auto-set the timezone?
I already did this for my admin_options.php. Would be easy to put in the install script
2,603 2006-02-06 19:49
Topic: PHP Highlighting for code tags (4 replies, posted in PunBB 1.2 modifications, plugins and integrations)
If you have a forum where you have alot of PHP coding withing your code tags, replace line 431 in parser.php (this is in v1.2.10)
$text .= '</p><div class="codebox"><div class="incqbox"><h4>'.$lang_common['Code'].':</h4><div class="scrollbox" style="height: '.$height_str.'"><pre>'.$inside[$i].'</pre></div></div></div><p>';
with
$text .= '</p><div class="codebox"><div class="incqbox"><h4>'.$lang_common['Code'].':</h4><div class="scrollbox" style="height: '.$height_str.'"><pre>'.highlight_string($inside[$i],true).'</pre></div></div></div><p>';
This should work fine, but as I'm not on my dev machine atm, I didn't get the chance to test it.
Have fun
-- Bekko
2,604 2006-02-06 17:08
Re: How to stop regular spam posts? (16 replies, posted in PunBB 1.2 discussion)
In parser.php, you could try sending the message() function when a certain word/sentence is in a post.
Something like this (doing this out of my head ):
$unallowed_words = array("Viagra","Ciaris"); // add some more in this style
$str_unallowed = implode(", ",$unallowed_words);
if(strpos($text,$unallowed_words)) {
message("This is a message against spam bots. Please remove the words " . $str_unallowed . " from your post.");
}
2,605 2006-02-06 17:01
Re: [Release] AP_Broadcast_Email 1.0 (52 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Yes, get a smaller community Although it would require quite a big community (in the millions or so :S) to reach 30-40 seconds of execution.
Try checking the code for any infinite loops
2,606 2006-02-06 16:40
Re: Smiley Menu 0.7 (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I've just added this, and it works like a charm - that's a big compliment, as I'm not exactly Mrs Code Queen!
Apart from a big THANK YOU, I have these 3 comments:1] You didn't add your license disclaimer thingy, so I've written one in
2] I moved the position to after the ul.bblinks and took the width&margin properties off - as I don't have a mile-wide screen (and nor do most users), that looks neater.
3] As a good webaunty, I need/want to add alt tags to the smilies. Where do I put them?Just seen that you've released another update, so maybe you've answered the above.
Thanks for the smilies!Cx
Well, first of all, thx
Then for the comments:
1) Yea, I always forget that When my comp's fixed, I'll add it
2) The position is your choice ofcourse I originally made it for a friend of mine, who wanted it in there .
-- The width setting is set to 20%, which auto-resizes to your screen I tested it on a 1024x768 and it looked quite well. The (top)margin is set to correct the difference between the position of the menu and the message txtbox The right-margin is removed in 0.4
3) I'm pretty sure the images have alt tags But if you want to set them, it's in the do_smilies function in parser.php. Lemme check if it's set
-- Bekko
EDIT: Yeps, I was right
$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);
As you can see, the alt tag is set to show the image name (I think, it's rather messy to me :S) But of course, you can easily change that.
2,607 2006-02-05 16:37
Re: Smiley Menu 0.7 (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Good question Changed
2,608 2006-02-05 12:09
Re: how I can use SWF of my forum (14 replies, posted in PunBB 1.2 troubleshooting)
You mean embed them with BBCode?
2,609 2006-02-05 12:07
Re: Smiley Menu 0.7 (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
2,610 2006-02-04 22:28
Topic: Smiley Menu 0.7 (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
This mod adds the possibility to easily add smilies to posts by clicking on them from a small menu next to the message textbox. (much like in phpBB)
##
##
## Mod title: Smiley Menu
##
## Mod version: 0.7
## Works on PunBB: Should work on every version
## Release date: 2006-05-10
## Author: El Bekko (elbekko@gmail.com)
##
## Description: This tool adds the possibility to
## easily add smileys to posts by
## clicking on them in a small menu.
##
## Difference with
## previous version: Quick Post bug fixed. See step 16 & 17 for fix.
##
## Affected files: post.php, viewtopic.php
##
## Affects DB: No
##
## Notes: Changed the check for duplicate entries in 0.5
##
## 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.
##
##
[url=http://www.punres.org/files.php?pid=174]Download Here[/url
2,611 2006-02-03 20:50
Re: Want to run PunBB forum without login/registration (1 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Just make all forums fully accessible for guests
2,612 2006-02-03 20:10
Re: Easy Custom Smilies v0.5 (18 replies, posted in PunBB 1.2 modifications, plugins and integrations)
0.5.1 uploaded.
2,613 2006-02-03 18:51
Re: Strange issue using pconnect (4 replies, posted in PunBB 1.2 bug reports)
Your server might automatically close pconnects, but I think that would be rather, ehm, uncommon
I don't think it's a punBB bug neither. But that's just my thought
2,614 2006-02-03 18:43
Re: Easy Custom Smilies v0.5 (18 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Do note, there seems to be a minor bug in the readme that I'll update today or tomorrow (probably today). I forgot to change the part to paste in parser.php after I updated a db function there
So expect another update with some more fixes soon
2,615 2006-02-02 20:54
Re: Easy Custom Smilies v0.5 (18 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Updated to version 0.5, fixes are described in top post.
2,616 2006-02-02 19:34
Re: Easy Custom Smilies v0.5 (18 replies, posted in PunBB 1.2 modifications, plugins and integrations)
It's not so hard for the most stuff, indeed Now come find me on IRC X(
2,618 2006-02-02 16:46
Re: Logging in fails in frameset (IE) (3 replies, posted in PunBB 1.2 troubleshooting)
K, thx, it worked
2,619 2006-02-02 16:19
Topic: Logging in fails in frameset (IE) (3 replies, posted in PunBB 1.2 troubleshooting)
A friend of mine installed 1.2.10 a couple of days ago. He uses a .be domain with domainforwarding (creates a frame on the domain page). Whenever a user with IE tries to log on from the domain he gets the message he's logged in, gets redirected to the main page and isn't logged in. It works fine without the domain's frameset tho.
Any idea what the problem might be? (except for not using IE, as most of his class, what the forum is for, probably is to stupid to get Firefox)
-- Bekko
2,620 2006-02-02 16:07
Re: Easy Custom Smilies v0.5 (18 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I saw your memos Smartys... I know it doesn't hae support for anything else than MySQL, and I clearly stated that. I'm trying to make it compatible with all, as you obviously saw on punres.org.
And it would also help if you state EXACTLY where those errors are, as I'm not suhc a 1337 coder as you that has written numerous mods I'm looking into fixing it now (installer were some copy errors ).
But I don't like modifying code without adding an extra feature ontop So tell me what should be improved/added
2,621 2006-02-01 22:19
Re: Minimum Number Of Posts To Enter A Forum?... (10 replies, posted in PunBB 1.2 troubleshooting)
Code:
if ($id == 1,2,3,4,8,9)
? Not specifically those, but can you make this affect multiple forums like that?
Also, the code for viewforum.php, does this need to go in a specific place or overwrite a specific piece of code? I dont think it does, but would like to make sure.
More as in:
$forum_ids = array(1,2,3,4,8,9);
if(in_array($id,$forum_ids))
{
...
}
2,622 2006-02-01 22:16
Re: Limit Image Sizes in Sigs (5 replies, posted in PunBB 1.2 troubleshooting)
True... you could try to ping the server the image is on when the signature gets submitted. If it reaches x ms you don't parse it. Would create a simple solution, but a huge speed decrease in the signature submit part.
2,623 2006-02-01 21:56
Re: Limit Image Sizes in Sigs (5 replies, posted in PunBB 1.2 troubleshooting)
getimagesize()
From the PHP manual:
getimagesize
(PHP 3, PHP 4, PHP 5)
getimagesize -- Get the size of an image
Description
array getimagesize ( string filename [, array &imageinfo] )
The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML <IMG> tag.
If accessing the filename image is impossible, or if it isn't a valid picture, getimagesize() will return FALSE and generate an error of level E_WARNING.
Note: Support for JPC, JP2, JPX, JB2, XBM, and WBMP became available in PHP 4.3.2. Support for SWC exists as of PHP 4.3.0 and TIFF support was added in PHP 4.2.0
Note: JPEG 2000 support was added in PHP 4.3.2. Note that JPC and JP2 are capable of having components with different bit depths. In this case, the value for "bits" is the highest bit depth encountered. Also, JP2 files may contain multiple JPEG 2000 codestreams. In this case, getimagesize() returns the values for the first codestream it encounters in the root of the file.
Note: The getimagesize() function does not require the GD image library.
Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF, 15 = WBMP, 16 = XBM. These values correspond to the IMAGETYPE constants that were added in PHP 4.3.0. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag.
Example 1. getimagesize (file)
<?php
list($width, $height, $type, $attr) = getimagesize("img/flag.jpg");
echo "<img src=\"img/flag.jpg\" $attr alt=\"getimagesize() example\" />";
?>
URL support was added in PHP 4.0.5
Example 2. getimagesize (URL)
<?php
$size = getimagesize("http://www.example.com/gifs/logo.gif");
// if the file name has space in it, encode it properly
$size = getimagesize("http://www.example.com/gifs/lo%20go.gif");
?>
With JPG images, two extra indexes are returned: channels and bits. channels will be 3 for RGB pictures and 4 for CMYK pictures. bits is the number of bits for each color.
Beginning with PHP 4.3.0, bits and channels are present for other image types, too. However, the presence of these values can be a bit confusing. As an example, GIF always uses 3 channels per pixel, but the number of bits per pixel cannot be calculated for an animated GIF with a global color table.
Some formats may contain no image or may contain multiple images. In these cases, getimagesize() might not be able to properly determine the image size. getimagesize() will return zero for width and height in these cases.
Beginning with PHP 4.3.0, getimagesize() also returns an additional parameter, mime, that corresponds with the MIME type of the image. This information can be used to deliver images with correct HTTP Content-type headers:
So yes, it can be done, assuming that the host's PHP version is > 4.3.0
2,624 2006-02-01 15:22
Re: How do I change this line to not open in _blank (1 replies, posted in Programming)
Try finding those JScript functions
2,625 2006-02-01 15:21
Re: HOWTO: Add more smilies (55 replies, posted in Feature requests)
Absolutely no idea