Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: avatar maker plugin for cpg 1.4.x  (Read 52891 times)

0 Members and 1 Guest are viewing this topic.

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
avatar maker plugin for cpg 1.4.x
« on: October 08, 2007, 01:28:23 am »

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

« Last Edit: March 03, 2010, 09:59:10 am by Joachim Müller »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: avatar maker plugin for cpg 1.4.x
« Reply #1 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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: avatar maker plugin for cpg 1.4.x
« Reply #2 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
Logged

lukasino

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: avatar maker plugin for cpg 1.4.x
« Reply #3 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)
« Last Edit: October 10, 2007, 07:57:35 am by lukasino »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: avatar maker plugin for cpg 1.4.x
« Reply #4 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.
Logged

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: avatar maker plugin for cpg 1.4.x
« Reply #5 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.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: avatar maker plugin for cpg 1.4.x
« Reply #6 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.
Logged

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: avatar maker plugin for cpg 1.4.x
« Reply #7 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!

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: avatar maker plugin for cpg 1.4.x
« Reply #8 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 plugin to find all exist hook points , that makes your plugin creation much easer task
« Last Edit: October 12, 2007, 05:52:20 am by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

foulu

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 236
  • uhm
Re: avatar maker plugin for cpg 1.4.x
« Reply #9 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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: avatar maker plugin for cpg 1.4.x
« Reply #10 on: October 13, 2007, 11:58:01 pm »

You're welcome ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: avatar maker plugin for cpg 1.4.x
« Reply #11 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.
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: avatar maker plugin for cpg 1.4.x
« Reply #12 on: October 17, 2007, 03:28:44 pm »

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

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: avatar maker plugin for cpg 1.4.x
« Reply #13 on: October 17, 2007, 04:09:49 pm »

Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: avatar maker plugin for cpg 1.4.x
« Reply #14 on: October 17, 2007, 06:30:29 pm »

OK, working now!  :)
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: avatar maker plugin for cpg 1.4.x
« Reply #15 on: October 18, 2007, 08:45:58 am »

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

purplefreak3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: avatar maker plugin for cpg 1.4.x
« Reply #16 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/

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: avatar maker plugin for cpg 1.4.x
« Reply #17 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.
Logged

purplefreak3

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: avatar maker plugin for cpg 1.4.x
« Reply #18 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

Logged

Mimer

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 129
    • Fjotte
Re: avatar maker plugin for cpg 1.4.x
« Reply #19 on: May 30, 2009, 11:57:44 pm »

Danish language file attached.

Mimer  8)
Logged
Pages: [1] 2   Go Up
 

Page created in 0.033 seconds with 21 queries.