forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: foulu on October 08, 2007, 01:28:23 am

Title: avatar maker plugin for cpg 1.4.x
Post by: foulu on October 08, 2007, 01:28:23 am
demo: http://ffgalleries.net/work/papm/index.php (http://ffgalleries.net/work/papm/index.php)
supported languages atm: english, italian

This plugin is used of making avatar from all the image in the gallery. You can set avatar width&height, choose where to crop the image and maybe add some effect (in future version).  

Installation:
1. Go to your config and enable plugins (if not already).
2. Open include/functions.inc.php and search
Code: [Select]
$thumb_list[$i]['pheight'] = $row['pheight'];
and replace with
Code: [Select]
$thumb_list[$i]['pheight'] = $row['pheight'];
$thumb_list[$i] = CPGPluginAPI::filter('thumb_list', $thumb_list[$i]);

Update:
Verion 1.1.1
- No more edit core code need (Sami, you rocks  ;D)
- Add italian language (thanks Lontano for your translation)
Verion 1.1.0
- Add make avatar link to individual image view (GauGau advises)
- When click to make avatar link, a new window will open. (GauGau advises)
- Remake the "CROP THIS IMAGE" button. (GauGau advises)
- Cover all the text into language file. You are free to modify or even make a new language for this plugin.
- Change the credit link. (GauGau advises)


[Edit GauGau 2010-03-03]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/avmaker

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_avmaker_v1.3.zip/download
[/Edit]

Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Sami on October 08, 2007, 06:29:33 am
Thank you foulu for contribution
Good work indeed

BTW changing theme.inc.php is not recommended method at all
instead you should copy that section to themes/yourtheme/theme.php if you don't have it already and changing the way you want to

in your situation
users should copy theme_display_thumbnails function and theme_display_film_strip function to their theme.php and change it the way you describe it
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Joachim Müller on October 09, 2007, 03:35:18 pm
Hey foulu,

awesome work. I have some suggestions though:

1) The [Make Avatar]-link is available on the thumbnails page only. Why not add it to the individual image view (displayimage.php) as well?
2) You're of welcome to take credit for your plugin. However, I don't think that it's a good idea to display your email address in the link, as it is spiderable and will probably result in a huge increase of spam for your email address. I suggest adding a link to your home page instead (maybe the contact form).
3) The link "crop the image" at the bottom of the page is not clearly recognizable as a button in the first place. When I tested your plugin on your demo page, I nearly gave up after cropping the avatar, because I couldn't find the "apply"-button. I suggest using a button (using the CSS class "button") instead of spreading the final submit bitton over the entire width of the table.
4) The width and height attributes of the initial pop-up are too small, so you have to resize the pop-up window. I suggest increasing the initial width or (even better) dropping the idea to start a pop-up window in the first place and make the avatar creation page open in the original window.

Cheers

Joachim
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: lukasino on October 10, 2007, 07:50:33 am
hello nice scripts, i'm translate to polish but how add polish letter? śćź etc.

I' have error
(http://www.otofotki.pl/miniaturki/wqdz1704662001a.jpg) (http://www.otofotki.pl/pokaz.php?id=wqdz1704662001a.jpg)
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Joachim Müller on October 10, 2007, 08:50:24 am
2. Open include/theme.inc.php and search (2 times = 2x)
Modifications should go into the theme (themes/yourtheme/theme.php) instead of include/themes.inc.php

hello nice scripts, i'm translate to polish but how add polish letter? śćź etc.
Impossible to say without seing what you changed. Zip your changed plugin and attach it to your posting.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: foulu on October 10, 2007, 09:42:51 am
Quote
Modifications should go into the theme (themes/yourtheme/theme.php) instead of include/themes.inc.php
Now the file should be modify is include/functions.inc.php.

Quote
I' have error
Download the lastest file and do as my install guide. if you want to translate to polish, you can copy the file english.php in my plugin to polish.php and modify it.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Joachim Müller on October 10, 2007, 03:36:26 pm
Now the file should be modify is include/functions.inc.php.
That's even worse. The whole reason why we encourage contributors to create plugins instead of mods is the fact that they don't have to mess with the core code. The file functions.inc.php definitely qualifies as "core code" (can't get more to the core than that). Why did you change that in the first place? If your plugin can't work as-is, then make the end user edit his custom theme instead of making it necessary to modify the core code.

Joachim

Sidenote: please stop editing the textual content of your initial posting over and over. The replies that refer to how your original posting used to be before tampering with it look misplaced. One of the benefits of a forum is the fact that a thread can evolve. Overwritting an existing thread is not a bright idea. Additionally, people who applied the original version of your code have no idea what they have to undo, since the original inctructions vansihed because you edited them out. Instead of editing out, use the strike-through format if you must edit your posting at all.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Davide Renda on October 11, 2007, 09:53:33 pm
Awesome stuff foulu! This plugin rocks, pal!
Find attached italian translation (as usual, unzip and place in the LANG directory).
Thanks!
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Sami on October 12, 2007, 05:45:41 am
@foulu:I know it's your plugin and I don't want to be rude , I've a suggestion to make it easer to install without changing core code
You can use already exist hook (thumb_data) instead of custom one (thumb_list)
here is the instruction :
edit codebase.php

- Change
Code: [Select]
$thisplugin->add_filter('thumb_list', 'avmaker_thumb_list'); to
Code: [Select]
$thisplugin->add_filter('thumb_data', 'avmaker_thumb_list');

- Now go to avmaker_thumb_list function and change
Code: [Select]
$thumb['caption'] = $add . '<br />' . $thumb['caption'];
to this
Code: [Select]
$thumb['caption_text'] = $add . '<br />' . $thumb['caption_text'];

This way you don't need any changes to core code ;)

Note:
You can use donnoman's visiblehookpoints (http://cpg-contrib.org/board/index.php?topic=256.0) plugin to find all exist hook points , that makes your plugin creation much easer task
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: foulu on October 13, 2007, 08:22:54 pm
@Lontano: thanks for yout translate, it add it in new version  :D
@Sami: thanks for your big help, now my plugin dont mess with core code anymore  ;D
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Sami on October 13, 2007, 11:58:01 pm
You're welcome ;)
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Hein Traag on October 15, 2007, 01:18:27 pm
english.php has a typo:    'er0'   => 'Avatar maker plugin is disabled !', add a d to disable ;)

My dutch.php is added as a txt file, just rename it.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: mykee on October 17, 2007, 03:28:44 pm
I cannot download your plugin.. What's wrong?
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Hein Traag on October 17, 2007, 04:09:49 pm
If you (left-click) this link nothing happens for you ? :http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=47430.0;attach=8672 (http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=47430.0;attach=8672)
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: mykee on October 17, 2007, 06:30:29 pm
OK, working now!  :)
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Hein Traag on October 18, 2007, 08:45:58 am
Would you mind sharing what you did to solve it (might benefit others later on). Thanks.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: purplefreak3 on May 04, 2009, 10:04:09 pm
Hello I was trying to use this plugin but it does not seem to be working properly for me. It installs fine and it can be used but when you go to make the avatar where you choose where to crop it it does not show any image when I looked at the data it was pulling it was pulling the information wrong could anyone help me fix this.

Link to the gallery is
http://www.beautifuljodelle.com/gallery/ (http://www.beautifuljodelle.com/gallery/)

Problem that occurs is it tries to pull the image to crop it just shows a X and when I click on Properties it is:

http://www.beautifuljodelle.com/gallery/albumsSilent_Hill009.jpg

instead of

http://www.beautifuljodelle.com/gallery/albums/Silent_Hill/009.jpg

Could anyone help me figure out what causing this? Thanks.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Joachim Müller on May 05, 2009, 07:32:49 am
Looks like you fiddled with your config: make sure that "The album directory" is populated properly - the default value is
Code: [Select]
albums/
Your gallery is totally outdated: you're running cpg1.4.10, while the most recent stable release currently is cpg1.4.22. It's mandatory to upgrade asap, although upgrading should not be subject of this thread.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: purplefreak3 on May 05, 2009, 05:38:55 pm
That part has never been touched it says albums/ anything else that could cause that?

I'll try to update the gallery. Thanks

Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Mimer on May 30, 2009, 11:57:44 pm
Danish language file attached.

Mimer  8)
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: crow5716 on October 09, 2009, 07:47:26 pm
Who is using this on their gallery right now? Or is there a demo of it somewhere? I would like to see how it works or what it does before inquiring more into it. Thanks

-crow
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: crow5716 on October 12, 2009, 06:51:03 pm
yes, no, hello?

-crow
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: Joachim Müller on October 12, 2009, 07:24:38 pm
Stop bumping: if nobody post then nobody has got an answer for you, or the people who could answer do not monitor this thread. As the plugin author's demo has gone down there apparently is not much interesst from his side to continue supporting or developing this plugin. If you need a demo, download the plugin and install it on your gallery or a testbed. If you don't like it, uninstall it and there will be no trace of it left. That's the whole point of plugins. That's why there are only very few demos available for plugins.
Title: Re: avatar maker plugin for cpg 1.4.x
Post by: xFyrios on January 19, 2010, 03:17:12 am
Is this plugin still working fine? I was trying to use this plugin but it does not want to work properly for me. :-\ It installs fine and can be used but when it shows the cropped image I only see the little icon for an unavailable image.

This is what I'm getting:
http://images.pretomeuploads.net/index.php?sx=0&sy=0&ex=450&ey=450&file=avmaker/avatar&action=effect&pid=12 (http://images.pretomeuploads.net/index.php?sx=0&sy=0&ex=450&ey=450&file=avmaker/avatar&action=effect&pid=12)

Could anyone help me out with figuring out what the issue is?


Thanks,
-xFyrios