Gallery mod
SP1.31 Beta 2
Hello Yabbers,
this mod integrates a gallery in the YaBB-board.
**** Installation ****
( - uninstall BETA 1 )
- files : english.lng , Admin.pl , AdminEdit.pl , Display.pl , Profile.pl , SubList.pl , Subs.pl
- apply the mod.
- set the perl-path at the first line in GALLERY.PL and copy it in your /Sources folder , chmod 777 !
- copy the 2 empty files GALLERYALB.TXT and GALLERYPUB.TXT in your /Members folder , chmod them 666 !
- upload all GIFs in your /YaBBImages folder.
- make a album folder for example : public_html/Gallery/ , chmod 777 !
- to setup the gallery :
fill-in the gallery-fields in "FORUM PREFERENCES AND SETTINGS" in the Admin Center
and the "GALLERY MEMBER SETTINGS"
- maybe you have to change some chmods if it doesn't work...
**** Upgrades ****
- create/rename/delete/publish album
- upload/rename/delete fotos/zip/tar
- public albums
- individual description,view
- caption ( you can use html-tags )
- profil-link and post-link
- support frontpage-pages
!!! thumbnailmaker doesn't work !!!
**** Explanations ****
- PROFILE- and POSTLINK shows only PUBLISHED ALBUMS from member.
- if GUESTACCESS is enabled and access for a user is disabled , then the USER CAN ACCESS AS GUEST.
- GUEST can access on PUBLIC ALBUMS.
- RIGHTS :
ACCESS - rename album, rename fotos, edit info
UPLOAD - all without publish
PUBLISH - publish
MODERATOR - all and access to all albums
- ACCESS is necessary for the 3 other RIGHTS
- UPLOAD max 5 fotos + 1 zip at once. General limits can be set in admin-center.
- UPLOAD THUMBNAILS FIRST, then the fotos, because if you reach limit you cannot upload more.
- if you uploaded the Fotos and enabled the thumbnail, but didn't uploaded thumbnails then you will see placeholders.
so you have to disable thumbnail or upload them to see the fotos.
- in EDIT INFO you only can set PERSONAL SETTINGS if admin allowed.
**** Testboard ****
http://www.archiboard.de/TESTBOARD/cgi-bin/yabb/YaBB.pl
login: test
pw: test
login: test2
pw: test2
**** Credits ****
Versions for SP1.1 and SP1.31 are available.
Big Thanx to Brain Brian, caliman, Dam Yankee, delrick, DocRST, Gilles, Ikari-Kun, Javvy, Jazhawk,
LoonyPandora, Michael Prager, Mr God Sir [Christer], mzbeanz, Panther, Parham, Poltergeist,
qersys, tenl, T-Master, WeBRecka[ZG], Wiehemeier, Xonder for help and testing.
On this way i can give a little bit back to the YaBB-community ;-)
Please help me to develop this mod.
**** Copyright by Le Trong Hoang ****
Use of this code is not allowed outside the copyright holder's intentions.
I spent a month of work, some days over 5 hours to create that mod, so please be fair.
This mod can use for non-commercial YaBB-boards. Use on commercial boards is forbidden until I give permission .
Changing code or implement it in another mod or program is forbidden until I give permission.
This mod can use by hackers to shot your webserver !
I will not stand responsible for any damage done to your server via this script.
Le Trong Hoang
http://www.archiboard.de
english.lng
if($MenuType == 1) {
### Gallery mod Beta 2 ####
$galltxt{'1'} = "Gallery Settings";
$galltxt{'2'} = "Enable gallery";
$galltxt{'3'} = "Absolute Directory to gallery ('/home/yourdomain/yabb/public_html/Gallery')";
$galltxt{'4'} = "Relative Directory to gallery ('../../public_html/Gallery')";
$galltxt{'5'} = "Enable guest-access";
$galltxt{'6'} = "Enable post-link";
$galltxt{'7'} = "Enable profile-link";
$galltxt{'8'} = "Enable personal settings";
$galltxt{'9'} = "Standards";
$galltxt{'10'} = "Enable description";
$galltxt{'11'} = "Description";
$galltxt{'12'} = "Enable artist";
$galltxt{'13'} = "Artist";
$galltxt{'14'} = "Enable caption";
$galltxt{'15'} = "Enable personal view";
$galltxt{'16'} = "Height of fotos";
$galltxt{'17'} = "[pixels] (blank = show originals size)";
$galltxt{'18'} = "Columns of fotos";
$galltxt{'19'} = "Enable thumbnails (disable = show originals)";
$galltxt{'20'} = "Names of thumbnails start with";
$galltxt{'21'} = "Height of thumbnails for thumbnailmaker";
$galltxt{'22'} = "Enable zip / tar";
$galltxt{'23'} = "Upload limits";
$galltxt{'24'} = "Max albums";
$galltxt{'25'} = "Max album fotos";
$galltxt{'26'} = "Max album size [bytes]";
$galltxt{'27'} = "Max gallery fotos";
$galltxt{'28'} = "Max gallery size [bytes]";
$galltxt{'29'} = "Gallery Member Settings";
$galltxt{'30'} = "Member";
$galltxt{'31'} = "Codes";
$galltxt{'32'} = "Access";
$galltxt{'33'} = "Upload";
$galltxt{'34'} = "Publish";
$galltxt{'35'} = "Moderator";
$galltxt{'36'} = "All";
$galltxt{'37'} = "Public albums";
$galltxt{'38'} = "Gallery";
$galltxt{'39'} = "Create album";
$galltxt{'40'} = "Rename";
$galltxt{'41'} = "Delete";
$galltxt{'42'} = "Upload fotos";
$galltxt{'43'} = "Thumbnails";
$galltxt{'44'} = "Edit info";
$galltxt{'45'} = "Albums";
$galltxt{'46'} = "Privat album";
$galltxt{'47'} = "Published album";
$galltxt{'48'} = "Public album";
$galltxt{'49'} = "Enabled";
$galltxt{'50'} = "Disabled";
$galltxt{'51'} = "Albumname :";
$galltxt{'52'} = "Do you really want rename";
$galltxt{'53'} = " to ";
$galltxt{'54'} = "Do you really want delete";
$galltxt{'55'} = "Do you really want ";
$galltxt{'56'} = "Unpublish";
$galltxt{'57'} = "Album";
$galltxt{'58'} = "Fotos";
$galltxt{'59'} = "Size";
$galltxt{'60'} = "Limits";
$galltxt{'61'} = "Contents";
$galltxt{'62'} = "Select files";
$galltxt{'63'} = "zip / tar";
$galltxt{'66'} = "Personal Settings";
$galltxt{'67'} = "Admin Settings";
$galltxt{'68'} = "[blank]";
$galltxt{'69'} = "Save";
$galltxt{'70'} = "Captions";
$galltxt{'71'} = "Can't create a new album, because name already exist or contains unallowed signs or ending ! Please try with another name.";
$galltxt{'72'} = "Can't rename, because name already exist or contains unallowed signs or ending ! Please try with another name.";
$galltxt{'73'} = "Upload thumbnails first. They have to start with : ";
$galltxt{'74'} = "Can't write : ";
$galltxt{'75'} = "Can't create a new album, because reached limit.";
$galltxt{'76'} = "Can't upload, because reached limit.";
$img{'website_sm'} = qq~$txt{'515'}~;
$img{'gallery'} = qq~$galltxt{'38'}~;
$img{'website_sm'} = qq~$txt{'515'}~;
$img{'gallery'} = qq~$galltxt{'38'}~;
Sources/Admin.pl
- $txt{'764'}
- $galltxt{'29'}
Sources/AdminEdit.pl
sub SetReserve {
sub SetGallery {
&is_admin;
$yymain .= qq~
~;
&template;
exit;
}
sub SetGallery2 {
&is_admin;
my @mbname=split(/, /,$FORM{'name'});
my @mbcode=split(/, /,$FORM{'code'});
my @mbacc;
my @mbupl;
my @mbpub;
my @mbmod;
my @acc=split(/, /,$FORM{'access'});
foreach(@acc) { $mbacc[$_]="1"; }
my @upl=split(/, /,$FORM{'upload'});
foreach(@upl) { $mbupl[$_]="1"; }
my @pub=split(/, /,$FORM{'publish'});
foreach(@pub) { $mbpub[$_]="1"; }
my @mod=split(/, /,$FORM{'moderator'});
foreach(@mod) { $mbmod[$_]="1"; }
my @Mbinfo;
my $mbnum=@mbname;
for(my $i=0;$i<=$mbnum;$i++) {
if(!$mbacc[$i]) { $mbacc[$i]="0" }
if(!$mbupl[$i]) { $mbupl[$i]="0" }
if(!$mbpub[$i]) { $mbpub[$i]="0" }
if(!$mbmod[$i]) { $mbmod[$i]="0" }
$Mbinfo[$i]="$mbname[$i] $mbcode[$i] $mbacc[$i]$mbupl[$i]$mbpub[$i]$mbmod[$i]\n";
}
if(!$mbname[$mbnum]) { splice(@Mbinfo,$mbnum); }
fopen(FILE, ">$memberdir/gallerymb.txt");
print FILE @Mbinfo;
fclose(FILE);
$yySetLocation = qq~$cgi;action=admin~;
&redirectexit;
}
if ($timeselected == 6) { $tsl6 = " selected" } elsif ($timeselected == 5) { $tsl5 = " selected" } elsif ($timeselected == 4) { $tsl4 = " selected" } elsif ($timeselected == 3) { $tsl3 = " selected" } elsif ($timeselected == 2) { $tsl2 = " selected" } else { $tsl1 = " selected" }
if ($allowgal) { $allowgalchecked = "checked" }
if ($allowgst) { $allowgstchecked = "checked" }
if ($allowpstlnk) { $allowpstlnkchecked = "checked" }
if ($allowprolnk) { $allowprolnkchecked = "checked" }
if ($allowset) { $allowsetchecked = "checked" }
if ($ad_descrip_on) { $ad_descrip_onchecked = "checked" }
if ($ad_fotograf_on) { $ad_fotograf_onchecked = "checked" }
if ($ad_caption_on) { $ad_caption_onchecked = "checked" }
if ($ad_view_on) { $ad_view_onchecked = "checked" }
if ($ad_thumbs_on) { $ad_thumbs_onchecked = "checked" }
if ($ad_zip_on) { $ad_zip_onchecked = "checked" }