avatar maker plugin for cpg 1.4.x avatar maker plugin for cpg 1.4.x
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

avatar maker plugin for cpg 1.4.x

Started by foulu, October 08, 2007, 01:28:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

foulu

demo: 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

$thumb_list[$i]['pheight'] = $row['pheight'];

and replace with

$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]


Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

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

lukasino

#3

Joachim Müller

Quote from: foulu on October 08, 2007, 01:28:23 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

Quote from: lukasino on October 10, 2007, 07:50:33 AM
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.

foulu

QuoteModifications 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.

QuoteI' 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.

Joachim Müller

Quote from: foulu on October 10, 2007, 09:42:51 AM
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.

Davide Renda

Awesome stuff foulu! This plugin rocks, pal!
Find attached italian translation (as usual, unzip and place in the LANG directory).
Thanks!

Sami

#8
@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 $thisplugin->add_filter('thumb_list', 'avmaker_thumb_list'); to

$thisplugin->add_filter('thumb_data', 'avmaker_thumb_list');


- Now go to avmaker_thumb_list function and change

$thumb['caption'] = $add . '<br />' . $thumb['caption'];

to this

$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 plugin to find all exist hook points , that makes your plugin creation much easer task
‍I don't answer to PM with support question
Please post your issue to related board

foulu

@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

Sami

‍I don't answer to PM with support question
Please post your issue to related board

Hein Traag

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.

mykee

I cannot download your plugin.. What's wrong?
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Hein Traag


mykee

My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Hein Traag

Would you mind sharing what you did to solve it (might benefit others later on). Thanks.

purplefreak3

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/

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.

Joachim Müller

Looks like you fiddled with your config: make sure that "The album directory" is populated properly - the default value isalbums/

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.

purplefreak3

That part has never been touched it says albums/ anything else that could cause that?

I'll try to update the gallery. Thanks


Mimer

Danish language file attached.

Mimer  8)