The BoardMod Project
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum
BoardMod Support Forum
[ Home | Help | Search | Login | Register ]  

23.05.13 at 01:42:13, Welcome, Guest. Please Login or Register

Choose Language:
Pages: 1 ... 88 89 90 91 92 93
Gallery Mod BETA 2 SP1.1 & SP1.31 (Read 104978 times)
Keith
Bloody Novice
*
Offline

, United Kingdom
Posts: 28



Reply #1335 - 20.09.04 at 11:35:02  
Hi

I am trying to install this mod on 1.3.2 and it is failing at Step 16.  It failed a couple of other Steps but I managed to modify it to work fine.

It is looking for:

Code:
	if ($ENV{REQUEST_METHOD} eq 'POST')

{

read(STDIN, my $input, $ENV{CONTENT_LENGTH});

split_string(\$input, \%FORM)

}


Instead, I have:

Code:
	split_string(\$ENV{QUERY_STRING}, \%INFO, 1);
if ($ENV{REQUEST_METHOD} eq 'POST') {
if ($ENV{CONTENT_TYPE} =~ /multipart\/form-data/){
require CGI; import CGI qw(:standard);
my $query = new CGI;
my (@keylist) = sort($query->param());
foreach $key (@keylist) {
if ($query->param('file')) {
$filename = $query->param('file');
$postsize -= length($query->param('file'));
$tmpfile = $query->tmpFileName($filename);
}

$postsize += length($query->param($key));
# may be dealing with multiple values; need to join with comma
$value = join(', ', $query->param($key));
$FORM{$key} = $value;
}

} else {
read(STDIN, my $input, $ENV{CONTENT_LENGTH});
split_string(\$input, \%FORM)
}

}


How can I modify the mod so that it will work with what I already have.  I tried manually but don't really understand fully what I am doing for this Step  Embarrassed
 
IP Logged
 
louisle
Hacker God
*****
Offline

Muenchen, Bayern, Germany
Posts: 1124



Reply #1336 - 20.09.04 at 16:54:17  
@keithmdw:
check out which line is already there and only add the lines which missing... that should work.

maybe you could tell us how you applied to sp1.3.2 - would be nice  Smiley

greetings
louisle
 
IP Logged
 

I LIKE SAUSAGE FINGERS2thumbsup2thumbsup2thumbsup2thumbsup2thumbsup
Keith
Bloody Novice
*
Offline

, United Kingdom
Posts: 28



Reply #1337 - 20.09.04 at 18:15:54  
I will try, but my code aready has an else statement in it, as does the code the mod is trying to add, so I asumed simply adding it would cause a problem as there would be two else statements.

If I get this working 100% I will post what I did.
 
IP Logged
 
izan
Bloody Novice
*
Offline

Posts: 1



Reply #1338 - 25.09.04 at 00:38:13  
I have been trying to use this mod with a fresh install of SP1.3.2 on a windows server (using a current member list).
I was able to get it to the point of the Gallery Page coming up okay when enabled. When I assign permissions to the Gallery I get the error message:

Untrapped Error:
/64.226.190.32/public/Gallery/87799071: No such file or directory at ./Sources/Gallery.pl line 129.

The assigned number of 87799071 does not exist in the current member list .txt file although the correct usrid does get the proper permissions assigned.

If I remove the gallerymb.txt file from the Members folder it's okay again. Can someone please explain how to correct this?

Thank you.
 
IP Logged
 
Keith
Bloody Novice
*
Offline

, United Kingdom
Posts: 28



Reply #1339 - 25.09.04 at 16:07:52  
I have this working fine now on 1.3.2 - just a bit of tweaking the mod so it installed around my other mods which had changed some of the code it was looking for.

I didn't do anything special, it just worked fine once I tweaked the mod.
 
IP Logged
 
louisle
Hacker God
*****
Offline

Muenchen, Bayern, Germany
Posts: 1124



Reply #1340 - 27.09.04 at 10:05:13  
@izan: the number you mentioned is a ID for a member. something went wrong so that the folder wasn't created for this member - you have to create it manually (don't forget to chmod it with 777) or delete the line with this name completely in gallerymb.txt and rebuild the ID by setting the rights in admin center>gallerymember settings ...

@Keith: maybe you could show us how you tweaked the mod..?

greetings
louisle
 
IP Logged
 

I LIKE SAUSAGE FINGERS2thumbsup2thumbsup2thumbsup2thumbsup2thumbsup
Keith
Bloody Novice
*
Offline

, United Kingdom
Posts: 28



Reply #1341 - 27.09.04 at 18:38:39  
Hi

Attached is the version of this I modified to get it installing on my 1.3.2 board.

A few steps were failing, but the last step was the one that was the biggest.  A bit of chopping and changing the mod so what it was looking for matched what I had and it worked.

And here is a list of the other mods I have installed.

YaBB 1 Gold - SP 1.3\Better Add Board 1.0.1.mod
YaBB 1 Gold - SP 1.3\Advanced Post Stats 1.3a.mod
YaBB 1 Gold - SP 1.3\Move Board 1.2.mod
YaBB 1 Gold - SP 1.3\Recent Users List 1.4.mod
YaBB 1 Gold - SP 1.3\Top Posters 1.1.mod
YaBB 1 Gold - SP 1.3\Users in Template 1.0.mod
YaBB 1 Gold - SP 1.3\enable_html_v14a_sp13.mod
YaBB 1 Gold - SP 1.3\greetplus_v_1_0a.mod
YaBB 1 Gold - SP 1.3\ModsInstalled_sp131.mod
YaBB 1 Gold - SP 1.3\smart_dates_sp13.mod
YaBB 1 Gold - SP 1.3\Recycle_Users.mod
YaBB 1 Gold - SP 1.3\SMTP_Authorisation.mod
YaBB 1 Gold - SP 1.3\MemberMap_3_sp131.mod
YaBB 1 Gold - SP 1.3\The_Guardian_SP1.3.x_UK.mod
YaBB 1 Gold - SP 1.3\has_image_2.mod
YaBB 1 Gold - SP 1.3\TopStats_11_sp131.mod
YaBB 1 Gold - SP 1.3\extended_profiles_v122_sp13.mod
YaBB 1 Gold - SP 1.3\chat_v1_98a_SP_1_3.mod
YaBB 1 Gold - SP 1.3\RSS_Feed_1_0.mod
YaBB 1 Gold - SP 1.3\menuitems_v_1_5_SP_1_3.mod
YaBB 1 Gold - SP 1.3\SplitSplice_1_SP13.mod
YaBB 1 Gold - SP 1.3\Sticky Group 1.0.mod
YaBB 1 Gold - SP 1.3\reg_fld_prot_uk.mod
YaBB 1 Gold - SP 1.3\file_attachment_B2.5.mod
YaBB 1 Gold - SP 1.3\moderationupdate_sp13.mod
YaBB 1 Gold - SP 1.3\Polls_3_SP13.mod
YaBB 1 Gold - SP 1.3\In-Thread Multi Delete 1.5.mod
YaBB 1 Gold - SP 1.3\Polls_3_Showcase_SP13.mod
YaBB 1 Gold - SP 1.3\Rename Board ID beta 1c.mod
YaBB 1 Gold - SP 1.3\report_to_moderator_sp.mod
YaBB 1 Gold - SP 1.3\BannerAdsSP1_v_1_6_SP_1_3.mod
YaBB 1 Gold - SP 1.3\Report to Moderator 1.3.2.mod
YaBB 1 Gold - SP 1.3\thread_header_sp13.mod
YaBB 1 Gold - SP 1.3\Sticky Shimmy Shuffle beta 1.0b.mod
YaBB 1 Gold - SP 1.3\prev_next_plus.mod
YaBB 1 Gold - SP 1.3\add_smilies3_SP13.mod
YaBB 1 Gold - SP 1.3\PostFieldCheckSP1_2SP1_3_attach.mod
YaBB 1 Gold - SP 1.3\Recycle Bin.mod
YaBB 1 Gold - SP 1.3\nicer_color_setup_1_sp131.mod
YaBB 1 Gold - SP 1.3\gallery SP131B2.mod
YaBB 1 Gold - SP 1.3\censor_update_beta1.mod
YaBB 1 Gold - SP 1.3\img_tag_bugfix_v11.mod
YaBB 1 Gold - SP 1.3\improved_code_boxes_v21a_sp13.mod
YaBB 1 Gold - SP 1.3\quick_reply_box_13.mod
YaBB 1 Gold - SP 1.3\Polls_3_More.mod
YaBB 1 Gold - SP 1.3\Attachments with Same Name Mod.mod
YaBB 1 Gold - SP 1.3\Advanced_System_Emails13_FIX.mod
 
IP Logged
 

gallery_SP131B2.mod (30 KB | 50 )
louisle
Hacker God
*****
Offline

Muenchen, Bayern, Germany
Posts: 1124



Reply #1342 - 28.09.04 at 10:55:49  
@Keith: thank you very much
 
IP Logged
 

I LIKE SAUSAGE FINGERS2thumbsup2thumbsup2thumbsup2thumbsup2thumbsup
thecaretaker
Hacker Wannabe
**
Offline

1066 Country, United Kingdom
Posts: 87



Reply #1343 - 29.09.04 at 12:03:52  
OK, firstly, this is a great mod. Well done.

I've installed it on Yabb 1.3.2. All is working apart 1 thing. The dreaded zero showing on the album folder size.

I wasn't going to post here (didn't want to make you angry), but I have read as manu posts as I could, tried various things (including #post 1155), but I've come to a halt. So I'm begging someone on bended knees to help me out here please!.

The thing is, it's all working fine. If I go to admin and reduce the max folder size to 1000, it gives the warning about the limit being reached if I upload an image that's larger. It's just not displaying the current folder size which seems stuck at 0. If I up the limit, it lets me upload images and works fine. So it's doing what it should, just not displaying correctly.

I've re-written the sub.pl must be 15-20 times in various different ways now and the same happens every time (or I get internal server error lol).

I've included below the before and after subs.pl section if anyone can give it a look over and see if I've missed anything obvious. But the fact that it's all working tends to make me think that it's a problem with the variable that shows the current folder size.

...

In both examples below, I have included the full sub readform section.

This is how my sub.pl looked before the mod
Code:
sub readform {
my(@pairs, $pair, $name, $value);
sub split_string
{
my ($string, $hash, $altdelim) = @_;

if($altdelim && $$string =~ m~;~) { @pairs = split(/;/, $$string); }
else { @pairs = split(/&/, $$string); }
foreach $pair (@pairs) {
($name,$value) = split(/=/, $pair);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if (exists($hash->{$name})) {
$hash->{$name} .= ", $value";
} else {
$hash->{$name} = $value;
}
}
}

split_string(\$ENV{QUERY_STRING}, \%INFO, 1);
if ($ENV{REQUEST_METHOD} eq 'POST')
{
read(STDIN, my $input, $ENV{CONTENT_LENGTH});
split_string(\$input, \%FORM)
}

$action = $INFO{'action'};
&ToHTML($INFO{'title'}); &ToHTML($FORM{'title'});
&ToHTML($INFO{'subject'}); &ToHTML($FORM{'subject'});
}


And this is what my subs.pl looks like after manually installing the mod (the one that makes it work correctly otherwise)
Code:
sub readform {
my(@pairs, $pair, $name, $value);
sub split_string
{
my ($string, $hash, $altdelim) = @_;

if($altdelim && $$string =~ m~;~) { @pairs = split(/;/, $$string); }
else { @pairs = split(/&/, $$string); }
foreach $pair (@pairs) {
($name,$value) = split(/=/, $pair);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if (exists($hash->{$name})) {
$hash->{$name} .= ", $value";
} else {
$hash->{$name} = $value;
}
}
}

split_string(\$ENV{QUERY_STRING}, \%INFO, 1);
if ($ENV{REQUEST_METHOD} eq 'POST') {
           if ($ENV{CONTENT_TYPE} =~ /multipart\/form-data/) {
                 require CGI; import CGI qw(:standard);
                 my $query = new CGI;
                 my $zipfile = $query->param('uplzip');
                 my $tmpfile = $query->tmpFileName($zipfile);

                 local( $/, *TMP );
                 open(TMP,"$tmpfile");
                 my $filedata = <TMP>;
                 close(TMP);

                 open(TMP2,">$memberdir/$zipfile");
                 print TMP2 $filedata;
                 close(TMP2);

                 for(my $x=1;$x<=5;$x++) {      
                       $feld = "uplfoto".$x;
                       my $file = $query->param($feld);
                       my $tpfl = $query->tmpFileName($file);

                       local( $/, *TMP );
                       open(TMP,"$tpfl");
                       my $filedata = <TMP>;
                       close(TMP);

                       open(TMP2,">$memberdir/$file");
                       print TMP2 $filedata;
                       close(TMP2);
                 }
           }
else {
read(STDIN, my $input, $ENV{CONTENT_LENGTH});
split_string(\$input, \%FORM)
}

}

$action = $INFO{'action'};
&ToHTML($INFO{'title'}); &ToHTML($FORM{'title'});
&ToHTML($INFO{'subject'}); &ToHTML($FORM{'subject'});
}


Many thanks in advance. I just can't crack this one on my own. It's such a small problem and everything works as it should, but this one is really doing my head in. I need some help from some pro yabbers on this one Wink

My Gallery is HERE


If you need any more details from me, just shout!
« Last Edit: 29.09.04 at 18:04:58 by thecaretaker »  
IP Logged
 

Growing old is mandatory. Growing up is optional!
louisle
Hacker God
*****
Offline

Muenchen, Bayern, Germany
Posts: 1124



Reply #1344 - 29.09.04 at 14:02:37  
@thecaretaker:
i took a look on it and sure it is not a problem with the subs.pl - the changes in subs.pl just affect the upload function.
i tried your limit settings on my board and it doesn't call any error.
it's strange that your 'gallery size' counts right and your 'album size' doesn't... TRY another CHMOD for your albumfolder, if it works you should try to change it in gallery.pl in sub albcrt{ } Code:
mkdir("$galleryabs/$mbcode/$FORM{'crtalbum'}",0777); 

- the last number sets the chmod of the created albums.

the variable which show the 'album size' is $consize in gallery.pl and is build by Code:
@Inf=stat("$albumdir/$_");
$size=$size+$Inf[7];
$consize=$size;

>stat< is perl and call informations of the diskspace...
if it works for 'gallery size' then it should works for 'albumsize' too... TRY upload the newest gallery.pl.

TRY to setup a new virgin yabbboard only with the gallery mod and check the limit-settings... if it happens again you can be sure it is nothing about the board and that something is wrong with the hardware-setttings.

between: a limit like 1000 fotos and 90000000000 album size is useless - you can limit your gallery with the first 3 parameters and leave the 'gallery size' and 'gallery fotos' blank.

Delete the login and pw in this thread - AGAIN: it is not very smart to posts logins and passwords anywhere so that everybody can read ! next time send me a Instant Message.

greetings
louisle

 
IP Logged
 

I LIKE SAUSAGE FINGERS2thumbsup2thumbsup2thumbsup2thumbsup2thumbsup
thecaretaker
Hacker Wannabe
**
Offline

1066 Country, United Kingdom
Posts: 87



Reply #1345 - 29.09.04 at 18:04:32  
Thanks for the advice. I shall try them and let you know how I get on.

ooops. thanks for the warnin' didn't think about it (was up half the night trying to sort it out). Will do.

Apart from this annoying little thing, I luv your mod to bits. You've worked hard at this m8 Wink
 
IP Logged
 

Growing old is mandatory. Growing up is optional!
thecaretaker
Hacker Wannabe
**
Offline

1066 Country, United Kingdom
Posts: 87



Reply #1346 - 29.09.04 at 22:38:46  
OK, tried changing chmod, no difference.

I replaced the gallery.pl by downloading the zip file afresh from post 1, no change.

I altered the $consize variable to $aconsize in case another mod was effecting it, just the same.

For now, I've removed the showing of the album size info by removing the lines from the gallery.pl. I will upload a fresh test board and try it again when I have some time.

Thanks you for your help.
 
IP Logged
 

Growing old is mandatory. Growing up is optional!
thecaretaker
Hacker Wannabe
**
Offline

1066 Country, United Kingdom
Posts: 87



Reply #1347 - 30.09.04 at 23:32:03  
I've had to removed the gallery from my forum. I've sent details of the problem in an IM.
 
IP Logged
 

Growing old is mandatory. Growing up is optional!
Eric Bewley
Guest





Reply #1348 - 03.10.04 at 04:24:36  
Louisle,

Thanks for all of your help. I've finally got the gallery mod installed but here's my problem. I can't seem to get the user folders to be made. I get that real common error of untrapped loop. So, I found my username's number and made a folder of that in the gallery directory. After that it'll get me to the gallery main screen but from there I can not upload make folders anything.

I'm on an NT server so I don't (think) it's a permission issue but the scripts don't seem able to write the subdirectories or anything in the gallery directory...

Thank you for your help.

-Eric
 
IP Logged
 
louisle
Hacker God
*****
Offline

Muenchen, Bayern, Germany
Posts: 1124



Reply #1349 - 03.10.04 at 14:10:28  
@Eric Bewley:
is your gallery directory in a for web opened place ?
did you apply the first line of gallery.pl to your perl directory ?
your absolute path could be set wrong - don't use driveletter - check out post#1 for details ..
your gallery.pl should be in the same folder like the other .pl from yabb - this folder should allow to execute scripts.

greetings
louisle
 
IP Logged
 

I LIKE SAUSAGE FINGERS2thumbsup2thumbsup2thumbsup2thumbsup2thumbsup
Pages: 1 ... 88 89 90 91 92 93
© 2000-2012 by - All rights reserved.

Project website hosting proudly sponsored and provided by UK2 Hosting
 The Project | News | Downloads | Mods | FAQ | Templates | Chat | Forum