Anyone begin any mod for Olympus yet?
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
- yexusbeliever
- Registered User
- Posts: 249
- Joined: Fri Feb 27, 2004 1:36 am
- Location: Olympus phpBB3 will be released
Anyone begin any mod for Olympus yet?
Another wondering question. Has anyone begin to look into the planning of any mod for the new v.3.0? If so, I like to know. Please share your ideas.
hmm....
Re: Anyone begin any mod for Olympus yet?
I'm sure several are "planned" by MOD authors, however, we advise not to begin the creation of MODs until at least the beta stage as things are constantly changing, and the final code isn't yet, well ... finalized (no pun intended).
- Adam
- Adam
A teacher is one who says, "Stand on my shoulders and reach higher."
Honored supporter of the phpBB Group!
phpBB Support: Search
My Blog: Technology Edition
Honored supporter of the phpBB Group!
phpBB Support: Search
My Blog: Technology Edition
- yexusbeliever
- Registered User
- Posts: 249
- Joined: Fri Feb 27, 2004 1:36 am
- Location: Olympus phpBB3 will be released
Re: Anyone begin any mod for Olympus yet?
I know this is off-topic, but I like to ask you. Adam, are you a Christian? If so, what is your Christian background?
hmm....
Re: Anyone begin any mod for Olympus yet?
not making any mods for public use, but I started the development for the additionals that will be needed..
frustrating when the code changes again 8O
some I wouldn't even call a development as it is probaly the lamest piece of script I ever wrote, but then again, it's only to see what it would look like
frustrating when the code changes again 8O
some I wouldn't even call a development as it is probaly the lamest piece of script I ever wrote, but then again, it's only to see what it would look like
-- this space for rent --
- yexusbeliever
- Registered User
- Posts: 249
- Joined: Fri Feb 27, 2004 1:36 am
- Location: Olympus phpBB3 will be released
Re: Anyone begin any mod for Olympus yet?
I like to see your mods being at work. Mind sharing what how your mods are progressing?
hmm....
Re: Anyone begin any mod for Olympus yet?
LOL.. if development quit messing with the code
so far no biggies..
avatar_upload is changed.. when uploaded it will be resized in 3 diff formats, and the original gets deleted. That way users can upload massive pictures, up to 2mb in size (php.ini limit) but it will eventually only take 8kb in storage space.
some small stuff..
moved the forum on index.php to forum.php
redid the template to fit the company style and moved things around a lot
added about 20 profile_fields, by changing the user table.. it was easier to do it that way then using custom_profile_fields (which isn't really working yet anyway) that might change again though, depending on the final version.
Coming up: an events-calendar.. that will be interesting.
so far no biggies..
avatar_upload is changed.. when uploaded it will be resized in 3 diff formats, and the original gets deleted. That way users can upload massive pictures, up to 2mb in size (php.ini limit) but it will eventually only take 8kb in storage space.
some small stuff..
moved the forum on index.php to forum.php
redid the template to fit the company style and moved things around a lot
added about 20 profile_fields, by changing the user table.. it was easier to do it that way then using custom_profile_fields (which isn't really working yet anyway) that might change again though, depending on the final version.
Coming up: an events-calendar.. that will be interesting.
-- this space for rent --
- yexusbeliever
- Registered User
- Posts: 249
- Joined: Fri Feb 27, 2004 1:36 am
- Location: Olympus phpBB3 will be released
Re: Anyone begin any mod for Olympus yet?
Hey man! I really encourage you. I want to get that custom profile mod when it gets out! It is something I am really looking towards getting with this new version.Sidha wrote: LOL.. if development quit messing with the code
so far no biggies..
avatar_upload is changed.. when uploaded it will be resized in 3 diff formats, and the original gets deleted. That way users can upload massive pictures, up to 2mb in size (php.ini limit) but it will eventually only take 8kb in storage space.
some small stuff..
moved the forum on index.php to forum.php
redid the template to fit the company style and moved things around a lot
added about 20 profile_fields, by changing the user table.. it was easier to do it that way then using custom_profile_fields (which isn't really working yet anyway) that might change again though, depending on the final version.
Coming up: an events-calendar.. that will be interesting.
hmm....
-
- Registered User
- Posts: 397
- Joined: Tue Jul 20, 2004 6:21 am
- Location: Rotterdam, The Netherlands
- Contact:
Re: Anyone begin any mod for Olympus yet?
it's quite easy actually...
umm... lemme grab some code
umm... lemme grab some code
-- this space for rent --
Re: Anyone begin any mod for Olympus yet?
a strange thing though... the first time I ran it in admin, it gave an error since it was trying to create new fields in the database that I had already made manually.. so, no database modification is nessecarry
in admin/admin_board.php
find (somewhere like line 63)
add below
(edit)
in language/en/admin.php
this gives you 3 boxes in the avatar panel in admin.. small, medium and large size.. you only need to give one number, resizing will be done with maintaining the aspect ratio of the image
then in includes/function_user.php
find (somewhere like line 1030)
add before
then in includes/function_user.php
just below it, create a new function
this will create 3 images
tmb1_(phpbb_created_filename)
tmb2_(phpbb_created_filename)
tmb3_(phpbb_created_filename)
for now the original image is still there, but with a simple unlink it can be removed, however.. the next part is the tricky one.. and that's why I left it like this for now.
in admin/admin_board.php
find (somewhere like line 63)
Code: Select all
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'type' => 'textᚼ', 'explain' => true)
Code: Select all
'avatar_size_small' => array('lang' => 'AVATAR_SIZE_SMALL', 'type' => 'textɇɈ', 'explain' => true, 'append' => ' ' . $user->lang['PIXELS']),
'avatar_size_medium' => array('lang' => 'AVATAR_SIZE_MEDIUM', 'type' => 'textɇɈ', 'explain' => true, 'append' => ' ' . $user->lang['PIXELS']),
'avatar_size_large' => array('lang' => 'AVATAR_SIZE_LARGE', 'type' => 'textɇɈ', 'explain' => true, 'append' => ' ' . $user->lang['PIXELS']),
in language/en/admin.php
Code: Select all
'AVATAR_SIZE_SMALL' => 'Small avatar size',
'AVATAR_SIZE_SMALL_EXPLAIN' => 'Size of the avatar in the lists',
'AVATAR_SIZE_MEDIUM' => 'Medium avatar size',
'AVATAR_SIZE_MEDIUM_EXPLAIN' => 'Size of the avatar in the forums',
'AVATAR_SIZE_LARGE' => 'Large avatar size',
'AVATAR_SIZE_LARGE_EXPLAIN' => 'Size of the avatar on the profile',
then in includes/function_user.php
find (somewhere like line 1030)
Code: Select all
return array(AVATAR_UPLOAD, $realfilename, $width, $height);
Code: Select all
avatar_thumbnail('1',$realfilename,$filetype,$config['avatar_size_small']);
avatar_thumbnail('2',$realfilename,$filetype,$config['avatar_size_medium']);
avatar_thumbnail('3',$realfilename,$filetype,$config['avatar_size_large']);
just below it, create a new function
Code: Select all
// AVATAR THUMBNAIL
function avatar_thumbnail($num,$file,$type,$size)
{
global $phpbb_root_path,$config;
$imgsize = @getimagesize($phpbb_root_path.$config['avatar_path'].'/'.$file);
$pic_width = $imgsize[0];
$pic_height = $imgsize[1];
switch ($type)
{
case 'jpg':
$src = @imagecreatefromjpeg($phpbb_root_path.$config['avatar_path'].'/'.$file);
break;
case 'jpeg':
$src = @imagecreatefromjpeg($phpbb_root_path.$config['avatar_path'].'/'.$file);
break;
case 'png':
$src = @imagecreatefrompng($phpbb_root_path.$config['avatar_path'].'/'.$file);
break;
}
if(!src)
{
$error[] = $user->lang['AVATAR_NOT_UPLOADED'].' => No SRC';
return false;
}
if ($pic_width > $pic_height)
{
$thumbnail_width = $size;
$thumbnail_height = ($size * ($pic_height/$pic_width));
}
else
{
$thumbnail_height = $size;
$thumbnail_width = ($size * ($pic_width/$pic_height));
}
$thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height);
@imagecopyresampled($thumbnail, $src, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height);
$pic_thumbnail = 'tmb'.$num.'_'.$file;
switch ($type)
{
case 'jpg':
@imagejpeg($thumbnail, $phpbb_root_path.$config['avatar_path'].'/'.$pic_thumbnail, 50);
break;
case 'jpeg':
@imagejpeg($thumbnail, $phpbb_root_path.$config['avatar_path'].'/'.$pic_thumbnail, 50);
break;
case 'png':
@imagepng($thumbnail, $phpbb_root_path.$config['avatar_path'].'/'.$pic_thumbnail);
break;
}
@chmod($phpbb_root_path.$config['avatar_path'].'/'.$pic_thumbnail, 0777);
}
tmb1_(phpbb_created_filename)
tmb2_(phpbb_created_filename)
tmb3_(phpbb_created_filename)
for now the original image is still there, but with a simple unlink it can be removed, however.. the next part is the tricky one.. and that's why I left it like this for now.
-- this space for rent --