Recent Topics

1 Sep 07, 2006 18:44    

Welcome

The Avatars Plugin allows you to attach avatars (display pictures, gravatars, profile pics, etc) to a user, blog, post and category. You upload avatars within the b2evo adminstration, with either a large or small (or both) avatar images. If a large avatar image is specified then lightbox functionality is seen, as when the user clicks the small avatar, the large avatar will show in a lightbox. It makes use of the GD2 Image and the Gallery Plugin’s Libraries allowing for images to be resized and compressed to specified values.

http://balupton.com/packages/b2evolution/plugins/avatars_plugin/Avatars%20Plugin%20Preview.gif

Moved / Preview / Download / More Information: [url=http://www.balupton.com/blogs/b2evo?title=avatars_plugin]here.[/url]

[u]B2evo v2.x compatible release available [url=http://forums.b2evolution.net/viewtopic.php?t=15641]here[/url].[/u]

2 Sep 08, 2006 11:17

says "The installation of the plugin failed." sorry. In a 1,81 installation.

3 Sep 08, 2006 11:35

Ok if that happens, just copy the /avatars_plugin/avatars/ to /blogs/media/avatars_plugin/ and it should work then...

4 Sep 11, 2006 13:57

worked like a charm!

5 Sep 16, 2006 22:31

I'm developing a multiblog website where people can register and create their own blogs. My b2 version is 1.8. I want each user to upload their own image as their avatar. I have installed your Avatar plugin and it works fine with the default image but, i'm not able to upload any avatar. I don't see any option for that. :-/

I can pm you the link if you want.

Thanks in adv..

6 Sep 17, 2006 00:47

v0.1.0.0 does not have that functionality yet, it's just a quick piece of work. I will work on it more when i have the time.

7 Sep 20, 2006 19:45

Thanks balupton. I will wait.......... :D

8 Sep 26, 2006 05:46

i am using b2evolution 1.8.2 (i don't know if it works here, but if not, at least i'd know why it's not working)

installing the plugin following the instructions in the readme file gave me this:

Warning: is_dir(): Stat failed for (site here)/blogs/media/avatars_plugin/ (errno=20 - Not a directory)

any idea why? blog is working fine. i don't know why it returns this error. media folder has proper permissions. it however created a "avatars_plugin" file (not a folder) with 0KB for filesize.

I delete the 0kb file and tried copying the avatars_plugin folder to media/avatars_plugin, this time it returns this error after i click install on the plugins tab:

Warning: copy(site here)/htdocs/blogs/media/avatars_plugin/): failed to open stream: Is a directory in (site here)/htdocs/blogs/plugins/avatars_plugin/_avatars.plugin.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at (site here)/htdocs/blogs/plugins/avatars_plugin/_avatars.plugin.php:59) in (site here)/htdocs/blogs/inc/VIEW/_menutop.php on line 38

help please.

9 Sep 26, 2006 09:54

Yeh the copy code in that release is a bit dodgy and will always fail, so instead you need to do this;
Copy the /avatars_plugin/avatars/ to /blogs/media/avatars_plugin/ and then try to install.

It should work.

10 Oct 30, 2006 07:24

hello balupton

call me stupid if you like, but could you let me know specifically what file/folder goes into what folder please.

I have followed all instructions (with other combinations) as given to the other two posters above, and still failed!

many thanks

11 Oct 30, 2006 14:40

the /avatars_plugin/avatars folder goes into /blogs/media folder.

Then you upload your avatars to the appropriate folder.

12 Oct 30, 2006 15:56

that's my problem:

I don't have a /blogs/media folder
but I have a /media/blogs folder

I think you meant mysite/myblog/blogs/media folder because I find the other folder at: mysite/myblog/avatars_plugin/avatars

but my blogs folder isn't there, hence my confusion !

sorry for being such a blonde, but I'm new

thanks

13 Oct 30, 2006 16:24

Ok, the blogs folder is just general for the root of your b2evo setup, the folder that contains;
/conf/
/inc/
/media/
/plugins/
/skins/
/index.php
etc

So you stick the /avatars_plugin/ folder inside the /plugins/ folder, and then copy the /avatars_plugin/avatars/ folder to /blogs/media/avatars_plugin/.

Sorry it's soo confusing, but i'm really short on time, but when i do get some time i'll update it so it's all a automatic process.

14 Oct 30, 2006 17:19

ok
still can't get it 8|

thanks anyway
I'll keep an eye here for updates

15 Nov 01, 2006 17:54

v0.2.0.0 is out, refer to first post for details.

16 Nov 01, 2006 18:42

yeaaaa ! Nice one !

Installation procedure: active........
...........................Installed plugin.

Peace of cake !!

Let me be the first to congratulate you in here!

Thank you munch !

PS:
It's weard to see tomorrow' s date on the help file, but then again, I guess you live on the other side of the planet B)

I'll let you know how I got on

17 Nov 01, 2006 18:59

Allright, well i'm gonna head off for some much needed sleep...

So if you come across any problems you got like a while to wait. But you're an eager one, so keep fiddling with it, and pretty sure you'll get it eventually.

So to give you a head start, and if a remember correctly, you would want to upload your pick in the sidebar to;
/blogs/media/avatars_plugin/users/1.jpg

Then add the following where your image is in your skin file;

			<?php
				$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars'); 
				if( $avatars_Plugin ) 
				{
					$avatar = $avatars_Plugin->get_avatar( 1, 'user' );
					//if ( $avatar['name'] == 'no_image' )
					//{
					?><img alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php
					//}
				}
			?>

Should be good, i haven't tested it, and can't remember the code i wrote, but by looking it seems that it really was a quick port over from stuff i did back 10 months ago ( when i was a bit more like you :P ). But yeh, should all be good.

Good night (well morning now).... :)
So good yesterday for you... ;)

18 Nov 02, 2006 02:23

OK check out my site and see where I've put it
I won't touch it for a few hours :lol:

) See the comments as well (

Area_skin is easy, but I like your style
I look forward to the FINAL release !
What name will that be? (there already an Avatars in plugins)

It's about to turn 1.30 AM
Have a nice day

19 Nov 02, 2006 06:40

I rethought what you wanted to do, and i would be more like this;

         <?php 
            $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars'); 
            if( $avatars_Plugin ) 
            { 
               $avatar = $avatars_Plugin->get_avatar( $blog, 'blog' ); 
               if ( $avatar['name'] == 'no_image' ) 
               { 
               ?><img alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php 
               } 
            } 
         ?>

Then have your image as /blogs/1.jpg or whatever, i think that is more what u wanted to do, have a different avatar for each blog shown on the right.

Well theres lots of ways you can do it anyway.

What name will that be? (there already an Avatars in plugins)

Me and EdB had a talk over the names, as he wrote the original Avatars Plugin, but it only works with the 0.9 series of b2evolution, so mine is like the next generation of it. So it will still be called the Avatars Plugin.

The final release won't be out until some time, as i plan to incorporate some aspects of the Gallery 2 Project into it.

20 Nov 04, 2006 21:35

Yep my friend, you got is just right ! ($blog)

Just a quick on (I hope :) )

Is there a easy way to make the image clickable to redirect to the blog the image is refering to please ?

Many thanks for your spent time

21 Nov 04, 2006 21:39

<?php echo '<a href="'.regeneration_url('','blog='.$blog).'" title="Go to this blog">';
// the avatar code
echo '</a>'; ?>

22 Nov 04, 2006 21:56

sorry to bother again...........(twat here)

thats the code I currently use for now:

<?php
	$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars'); 
	if( $avatars_Plugin ) 
	{
	$avatar = $avatars_Plugin->get_avatar( $Item, '', 'custom' );
	//if ( $avatar['name'] == 'no_image' )
	//{
	?><img style="float:right; padding:0px; padding-right:5px;" alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php
	//}
	}
	?>

Do I put it inside (if yes where), or somewhere elso in _main.php ?

thanks again

23 Nov 04, 2006 22:06

<?php
echo '<a href="'.regeneration_url('','blog='.$blog).'" title="Go to this blog">'; 
   $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars'); 
   if( $avatars_Plugin ) 
   { 
   $avatar = $avatars_Plugin->get_avatar( $Item, '', 'custom' ); 
   //if ( $avatar['name'] == 'no_image' ) 
   //{ 
   ?><img style="float:right; padding:0px; padding-right:5px;" alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php 
   //} 
   } 
echo '</a>';
   ?>

24 Nov 04, 2006 22:17

yep...I tried that also earlier but I get:

Fatal error: Call to undefined function: regeneration_url()

???

25 Nov 04, 2006 22:20

hehe that's 5am coding for you, it's meant to be regenerate_url

26 Nov 04, 2006 22:43

wow, thats beauty...except (as you may expect from me 8| )........
that it redirects me to the blog I am whatching, not the blog the post was writen from.........weard.

edit: the idea is to use the Avatar on the blogall, so if they like the post, they go straight to the blog is was written on by clicking on the picture

5Am..mate you've got a long day ahead of you ! (I'm 8hrs behind you)

27 Nov 04, 2006 22:49

Yeh of course. Do this instead...

<?php 
echo '<a href="'.regeneration_url('','blog='.$Item->blog_ID).'" title="Go to this blog">';  
   $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');  
   if( $avatars_Plugin )  
   {  
   $avatar = $avatars_Plugin->get_avatar( $Item, '', 'custom' );  
   //if ( $avatar['name'] == 'no_image' )  
   //{  
   ?><img style="float:right; padding:0px; padding-right:5px;" alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php  
   //}  
   }  
echo '</a>'; 
   ?>

And if you want to force the display of the blog avatar, have

   $avatar = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'custom' );  

Ok going to bed now. Good night / morning / arvo or whatever. Neeed sleeep.... :-/

28 Nov 04, 2006 22:57

Thanks Bulapton

it seems to work, but at the moment I'm trying to sort the _stub files with Fralenuvol.........I'll come back to you whaen that's sorted

PS: generate......generate...........

thanks (nice star you've got (can't give more though, I'm still new))

29 Nov 05, 2006 08:31

now....this is probably the last hack I really would like to have working before I go heavy on content.........and give you some time to enjoy too ;)

It's not working

maybe you can see it on my site if it helps ---> see it from blogroll (blogroll is what this feature is about for me)

Thank you so much

30 Nov 05, 2006 08:35

Umm, what's it meant to do?

31 Nov 05, 2006 08:40

well.....

when visitor soso visits the site and browse blogall, and likes a post, he click on the avatar, and orbits into the writers's blog

32 Nov 05, 2006 08:52

So you want a avatar of the blogs to apear to the left of the blog titles in the blog list?

If so, send me over the code you are using for the blog list and i will make the adjustments.

33 Nov 05, 2006 09:04

Thank you

I would like an avatar to appear [u]to the right of the POST title[/u] (as it is now) to direct to the BLOG of the writer of that POST.(seen from blogall or else)

edit: (is there a way to impose a size on the picture?)

(the BIG pic on the right of BLOG uses another hack)

<?php 
echo '<a href="'.regenerate_url('','blog='.$Item->blog_ID).'" title="Go to this blog">';  
   $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');  
   if( $avatars_Plugin )  
   {  
   $avatar = $avatars_Plugin->get_avatar( $Item, '', 'custom' );  
   //if ( $avatar['name'] == 'no_image' )  
   //{  
   ?><img style="float:right; padding:0px; padding-right:5px;" alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php  
   //}  
   }  
echo '</a>'; 
   ?>

Thanks

34 Nov 05, 2006 09:21

So you want the blog's avatar to apear to the right hand of the post and link to the blog that that post is written for?

35 Nov 05, 2006 09:24

Absolutely correct my friend !

36 Nov 05, 2006 09:32


<?php 
$Items_Blog = & $Item->get_Blog();
$Items_Blog_url = $Items_Blog->get('url');
echo '<a href="'.$Items_Blog_url.'" title="Go to the blog of this post">';  
   $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');  
   if( $avatars_Plugin )  
   {  
   $avatar = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'custom' );  
   //if ( $avatar['name'] == 'no_image' )  
   //{  
   ?><img style="float:right; padding:0px; padding-right:5px;" alt="Author's display" src="<?php echo $avatar['url']; ?>" /><?php  
   //}  
   }  
echo '</a>'; 
   ?>

37 Nov 05, 2006 09:42

wow..............you ARE good !

Clean url and all :)

I must say that this is like magic to me (you're a guru after all !)

Many Many Many thanks

Enjoy a good break (from me)

38 Nov 05, 2006 09:45

Enjoy a good break (from me)

About time :P

* Gets back to study *

40 Nov 05, 2006 09:54

Enhanced by Bulapton

Well thats the first time i've seen my alias spelt like that. :-/

41 Nov 05, 2006 10:17

:oops: Oops....corrected :oops:

42 Nov 11, 2006 11:17

Hey Balupton,

Just want to say your plugins are absolutely brilliant - great work.

I tried to install the Avatar plug-in and move folders around but the permissions keep denying me. SO now I am left with a back office with the following massive error message:

ERROR: Conflicting function versions:
Function [scan_dir]
Original Version [2]
Attempted Version [3]


ERROR: Conflicting function versions:
Function [get_user_variable]
Original Version [4]
Attempted Version [6]


Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 16

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 26

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 31

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 36

Help, what do I do?

43 Nov 11, 2006 13:53

ok, the avatars plugin contains some newer version of functions that are contained in the gallery plugin. hence why you are getting conflicting version problems.

I will repackage the gallery plugin when i can, so it will use the updated functions. (Would say the 24th of this month be ok? because i'm in the middle of exams right now...)

:)

44 Nov 11, 2006 13:55

Alternatively, you could add a 'avatars_' to all the function names within the /resources/ folder, and then do a search and replace for all the function names when they are called via the avatars plugin.

45 Nov 12, 2006 14:07

Hey Bulapton,

Thanks for replying, I'm going to have a go at fixing myself this afternoon - fingers crossed, here goes!

46 Nov 12, 2006 14:18

Ok, I think I've made a right mess of this (but at least the site still works! :) )

I changed all of the file names in the /avatars_plugin/resources/functions/ folder so they had avatars_ in front of them.

So I'm left with:
/avatars_plugin/resources/functions/
avatars_array_walk.funcs.php
avatars_arrays.funcs.php
avatars_files.funcs.php
avatars_general.funcs.php
avatars_scan_dir.funcs.php
avatars_to_from_string.funcs.php
avatars_user_variable.funcs.php

I then went through each file and replaced any references to the files with the new names.

However, now my BackOffice Apps Settings comes up with the following error:


ERROR: Conflicting function versions:
Function [scan_dir]
Original Version [2]
Attempted Version [3]


ERROR: Conflicting function versions:
Function [scan_dir]
Original Version [2]
Attempted Version [3]


ERROR: Conflicting function versions:
Function [get_user_variable]
Original Version [4]
Attempted Version [6]


Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 16

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 26

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 31

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_general.funcs.php:38) in /home/rkjlnuiu/public_html/inc/VIEW/_menutop.php on line 38
Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 16

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 26

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 31

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 36

Hope I haven't done more harm than good!

Cheers
Sam :oops:

47 Nov 12, 2006 14:52

samuelpage wrote:

Hey Bulapton,

I don't think my alias is that hard to spell... ;)

samuelpage wrote:

Thanks for replying, I'm going to have a go at fixing myself this afternoon - fingers crossed, here goes!

Cool, shouldn't be a problem, and maybe you could post up a hacked up version for everyone else who wants to run both plugins, until i can sync the versions.

Edit: Oh you replied. Reading now.

48 Nov 12, 2006 14:54

Hehe, that's because you also forgot to rename the function names on lines that look like;
if( function_comp( 'file_to_array', 2 ) ) {

Which is what calls the function version checker.

Also remember that some of the resource functions may call other resource functions ;)

49 Nov 12, 2006 14:55

Sorry about name typo! I blame it on my dyslexia ;)

50 Nov 12, 2006 14:57

Whoops, just re-read your post.... The problem is not with the filenames, but open the files up, and change say;

if( function_comp( 'user_variable', 4 ) ) {
function user_variable( $name, $default = false, $values = false, $cookie = true, $recieved = true, $update = false, $stripslashes = true )


to

if( function_comp( 'avatars_user_variable', 4 ) ) {
function avatars_user_variable( $name, $default = false, $values = false, $cookie = true, $recieved = true, $update = false, $stripslashes = true )

Then also search all of the .php files in the avatars_plugin folder, and change all the calls to the renamed functions to call the renamed function.

51 Nov 12, 2006 14:57

Ah I see - now replacing those as well :)

52 Nov 12, 2006 15:08

Oups, not sure where I went wrong


Fatal error: Cannot redeclare scan_dir() (previously declared in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_scan_dir.funcs.php:8) in /home/rkjlnuiu/public_html/plugins/avatars_plugin/resources/functions/avatars_scan_dir.funcs.php on line 8

53 Nov 12, 2006 15:10

you forgot to rename function scan_dir to function avatars_scan_dir in;
plugins/avatars_plugin/resources/functions/avatars_scan_dir.funcs.php

54 Nov 12, 2006 15:10

Ah, just saw your post saying what to do - now undoing and trying that :)

55 Nov 12, 2006 15:15

I've definately got scan_dir as avatars_scan_dir (both file name and in function calls).

Still getting that error up.

57 Nov 12, 2006 15:20

Sorry about this balupton - must be a nightmare - my PHP skills don't touch your's yet!

I've attached my whole directory, thought it might be easier :)

58 Nov 12, 2006 15:26

Ok.

Steps;
1. Open each of the resource files in notepad or whatever.
2. Whenever you see a 'function myfunction' rename that to 'function avatars_myfunction', as well as whenever you see a 'function_comp( 'somefunction'' rename that to 'avatars_function_comp( 'avatars_somefunction''
3. Then in all those php files, and in the _avatars.plugin.php file, look for any 'somefunction(' that you have renamed and rename that appropriatly.

59 Nov 12, 2006 15:37

Ok, I'm certain I've done that - now coming back with:

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 16

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 26

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 31

Warning: Illegal offset type in /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/rkjlnuiu/public_html/plugins/gallery_plugin/resources/functions/_user_variable.funcs.php:16) in /home/rkjlnuiu/public_html/inc/VIEW/_menutop.php on line 38

60 Nov 12, 2006 15:43

Well something is still calling user_variable, and because we have renamed it to avatars_user_varaible, it is calling the old version in the gallery_plugin.

61 Nov 12, 2006 15:48

There's only three instances of user_variable in the avatars_plugin folder. They are definately all renamed to avatars_user_variable (1 is get_avatars_user_variable)

Should I be changing anything in the gallery plugin?

62 Nov 12, 2006 15:52

Sorry and a couple more that are also changed - I've done a complete site code search and there don't seem to be any others.

63 Nov 12, 2006 15:52

if( function_comp('get_user_variable', 6) ) {
	function user_variable( $args )


should be

if( function_comp('avatars_user_variable', 6) ) {
	function avatars_user_variable( $args )


		$avatar_type = user_variable($user_variable);

should be


		$avatar_type = avatars_user_variable($user_variable);

if that still doesn't work add the following line at the start of the avatars_user_variable function, then view your source and see what it outputs;

print_r($args);

those are the only snippets of code that should of changed regarding the user_variable function. And they should of only changed within the files of the avatars_plugin folder.

65 Nov 12, 2006 15:58

It will output something before you get all those errors so we can help figure out what is calling the bad user_variable function.

I need to go. I will be avaliable again in about 36 hours or so.

66 Nov 12, 2006 19:08

Thanks for all of your help so far balupton - I started fresh from the beginning working through code manually.

I seem to of reduced the errors to this one:


Fatal error: Call to undefined function: avatars_user_variable() in /home/rkjlnuiu/public_html/plugins/avatars_plugin/_avatars.plugin.php on line 105

I'm not sure why that is appearing, I've have double checked the avatars_user_variable is correct everywhere.

Will speak to you when you are next available.

Cheers
Sam

67 Nov 13, 2006 00:14

Ok. Take a moment, and think of what you are trying to accomplish. Think of what you are actually doing. Right now you are just hacking away at code and hoping that something which you don't even know what, works. Which is why you are getting error after error. And the errors should be enough for you to know what you did wrong, but in the first place you shouldn't even encounter these errors.

So yeh, just take a moment, put away that eagerness to hack things up, and think :)

68 Nov 13, 2006 11:01

Was thinking to use the category mode in this. I used the names of the categories but it didn't work. Then I was thinking that maybe I had to find out
what id the category had but I don't know where to find it... So maybe you can guide me :D

Cheeers!

69 Nov 13, 2006 14:10

An easy way is to go in your admin, on the Categories tab, get your mouse on a category name, if you look at the bottom left of your browser you'll see something like:
http://yourblogadress/admin.php?ctrl=chapters&action=edit&cat_ID=20

Here the category ID is: 20

Or you can copy and paste the link of the category name, juste have to get the cat_id="the id of your category".

70 Nov 13, 2006 14:43

neldor got it right :)

71 Nov 13, 2006 16:13

this release should fix the gallery plugin compatability issues... can someone test it out and let me know.

Edit: Technical Details:
What i did was add _vX to whatever functions had the incompatabilities and then changed their calls appropriatly.

A update on the gallery plugin's side would take a lot of time, due to the changes of the user_variable function. So i will not bother doing that. As v2 already contains the updated functions.

So there we go...

72 Nov 13, 2006 16:34

balupton wrote:

Ok. Take a moment, and think of what you are trying to accomplish. Think of what you are actually doing. Right now you are just hacking away at code and hoping that something which you don't even know what, works. Which is why you are getting error after error. And the errors should be enough for you to know what you did wrong, but in the first place you shouldn't even encounter these errors.

So yeh, just take a moment, put away that eagerness to hack things up, and think :)

Hi Balupton,

Firstly thanks for uploading the working version - it works great so far.

I take your point completly, it's just difficult with limited knowledge of PHP - sometimes trial and error is the only path! I'm more on the creative design side than programming and I've always been bad at mathodical and careful programming - still not an excuse!

Thanks for you help, very much appreciated.

73 Nov 13, 2006 16:38

I take your point completly, it's just difficult with limited knowledge of PHP - sometimes trial and error is the only path! I'm more on the creative design side than programming and I've always been bad at mathodical and careful programming - still not an excuse!

:)

74 Nov 14, 2006 14:35

I feel like a right pain in the backside - I'm stuck again :oops:

Everything has installed and I have added the code to my site:
http://www.gemsam.co.uk

The [No Image] image is displaying fine.

How do I now set it to show my user avatar - I have uploaded to /media/avatars_plugin/default/user/1.jpg but no luck.

75 Nov 14, 2006 15:36

Just took a look at the sight, and cannot see where you are using the avatars... A good way would be to add the following inside _avatars.plugin.php on line 218, 225 and 233

echo '<!-- $this->avatars['.$avatar_folder.']['.$avatar_type.'] -->'."\r\n";


That will show the results of the steps the avatars plugin does to validate the chosen avatar.

And add the following where u call get_avatar;

echo '<!-- '."\r\n".print_r($avatars_Plugin->avatars,true)."\r\n".' -->'."\r\n";


That will show the list of found avatars.

This will output the stuff to your page's source, hence the <!-- tags.

Edit: fixed up the first code tag.

76 Nov 14, 2006 18:28

Wow, just looking at this topic makes me a tad confused. I'll wait until it's out of BETA

77 Nov 14, 2006 19:58

v0.3.0.0 is out, check main post for details. - Note the call to get_avatar has changed, it needs extra handling. Read the readme for details.

mogster wrote:

Wow, just looking at this topic makes me a tad confused. I'll wait until it's out of BETA

Well these releases are out of beta, but they are all pre-proper releases hence the 0.x numbers. Expect a proper 1.x release sometime in *checks if no one is around* *whispers in your ear* january. That's because it will use a parts of the gallery project inside it, so i need to get the gallery project out the door first.

78 Nov 26, 2006 18:33

Is this plugin also the category-avatar and blog-avatar thing you talked about a few month ago ?
Because at this point I don't see them..

I can wait till the first month of the next year if I have to ;)

79 Nov 27, 2006 03:23

Is this plugin also the category-avatar and blog-avatar thing you talked about a few month ago ?

Yes it is :-)

Because at this point I don't see them..

You can force display of the category avatars by using;
$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'yourskinname' );

Good?

80 Jan 05, 2007 16:03

OK -- call me confused. :-/

I downloaded and installed v0.3.0.0 and the files and subfolders are located in /var/www/html/blogs/plugins/avatars_plugin.

"Avatars" shows up in App Settings >> Plugins under Available Plugins, but when I click to install I simply get "The installation of the plugin failed."

I also did copy /avatars_plugin/avatars/ to /blogs/media/avatars_plugin/ but still no success.

Got any hints?

81 Jan 14, 2007 13:55

Sorry for not replying (if that is the case), i'm currently extremely busy with work, and have barely had the time to even check my non-work email.

I will get back to you and everyone else as soon as i can, i'm gonna go with a week, no guarantees.

Thanks for your patience
- Balupton

82 Jan 15, 2007 10:47

balupton wrote:

Is this plugin also the category-avatar and blog-avatar thing you talked about a few month ago ?

Yes it is :-)

Because at this point I don't see them..

You can force display of the category avatars by using;
$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'yourskinname' );

Good?

Ok very interesting... this seems to be what I am looking for...

If I understood it correctly this plugin also have a feature wherein I can put a "logo" to categories?

So say, if I post to "Lord of the Rings Online" category (with a logo assigned to it), then the logo will appear?

Or I misunderstood it?

Thanks!!

83 Jan 15, 2007 11:48

balupton wrote:

Ok, the blogs folder is just general for the root of your b2evo setup, the folder that contains;
/conf/
/inc/
/media/
/plugins/
/skins/
/index.php
etc

So you stick the /avatars_plugin/ folder inside the /plugins/ folder, and then copy the /avatars_plugin/avatars/ folder to /blogs/media/avatars_plugin/.

Sorry it's soo confusing, but i'm really short on time, but when i do get some time i'll update it so it's all a automatic process.

Hmm... plugin installation failed.

If I understood your instruction correctly:

I uploaded the "folder" avatars_plugin that came from the zip file to the <blogroot>/plugins/ folder. So now I have this -> <blogroot>/plugins/avatars_plugin/

Now, as per your instruction, I copied the "avatars_plugin" folder located at <blogroot>/plugins/ folder to <blogroot>/media/ folder, so now I have this -> <blogroot>/media/avatars_plugin/

Still failed sadly, using the most recent version download link from your OP.

Thanks in advance for the help!

UPDATE:
Ok got it. Should be:

Copy the 'avatars' folder inside <blogroot>/plugins/avatars_plugin/ folder to <blogroot>/media/ folder.

Then rename that folder to "avatars_plugin", so you should now have <blogroot>/media/avatars_plugin/

^_^

84 Jan 15, 2007 13:16

Need help:

I want to use the avatar-category option, I have this:


					$Items_Cat = & $Item->get_category();
					$Items_Cat_url = $Items_Cat->get('url');
					echo '<a href="'.$Items_Cat_url.'" title="Go to the category of this post">';
					$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');
					if( $avatars_Plugin )
					{
						$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' );
						if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
						{
							?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the category of this post" style="float:right;" /><?php
						}
					}
					echo '</a>';

But it won't work because there's no


$Item->get_category();

What's the correct one?

Still trying to find it... hope to get a quick help for it

^_^

Thanks!!

UPDATE:
How can I add this to the RSS2 skin? I like to include the blog-avatar and category-avatar to my RSS2 feed.

Thanks again!!

EDIT: typo from my sample code above, should be:


$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' );

not:


$avatar = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'default' );

85 Jan 15, 2007 16:38

var $avatars; /* = array(); */
var $avatar_type = 'category';
var $avatar_types_size = 4;
var $avatar_types = array(
'user',
'blog',
'category',
'post'
);

Just change avatartype. This are for the normal skin. Although I don't know how to solve the rss2 part of your question.

86 Jan 22, 2007 19:30

Ok... I just tried what Laibcoms suggested in the Update and the plugin installed for me. Thanks.

87 Jan 23, 2007 08:16

Glad to be of help.

On the other hand, I still can't get to work the avatar-category option.

again, I'm using this code:


$Items_Cat = & $Item->get_category();
               $Items_Cat_url = $Items_Cat->get('url');
               echo '<a href="'.$Items_Cat_url.'" title="Go to the category of this post">';
               $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');
               if( $avatars_Plugin )
               {
                  $avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' );
                  if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
                  {
                     ?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the category of this post" style="float:right;" /><?php
                  }
               }
               echo '</a>';

88 Jan 23, 2007 08:35

mojman, that change would not apply to laibcoms situation as he is using

$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' ); 

instead of

$avatar = $avatars_Plugin->get_avatar( $Item ); 

which would do the same thing given your change...

Laibcoms stick this after your echo '</a>'; and post what it outputs, will help debug the problem.

echo '<pre>';
var_export($avatars_Plugin->avatars);
echo '</pre>';

Btw, thanks guys for helping each other out while i've been busy, it's great to see that happening :D I am finally on holidays, so I can actually get back to working on my own projects once again! Woohoo!

89 Jan 23, 2007 09:10

Thanks.

My first problem is this:


$Item->get_category();

I can't seem to figure out b2e's function for categories.

I just changed:


$Item->get_blog();

tried various and I might have missed it when looking at the files...

dunno the correct one.

90 Jan 23, 2007 09:19

Ok... If i'm following correctly now, the avatar is displaying fine but the link doesn't work. I think the correct thing to use to get the category url would be:

regenerate_url( 'cats,catsel', 'cat='.$cat_ID )


so

echo '<a href="'.regenerate_url( 'cats,catsel', 'cat='.$Item->main_cat_ID ).'" title="Go to the category of this post">'; 

91 Jan 23, 2007 09:39

Hi,

Thanks again. The category-avatar is working now.

Something new tho, how can I combine the two features - category-avatar & blog-avatar, or rather is there a minimal way of combining these two codes? (to avoid redundancy)

blog-avatar


					$Items_Blog = & $Item->get_blog();
					$Items_Blog_url = $Items_Blog->get('url');
					echo '<a href="'.$Items_Blog_url.'" title="Go to the site of this post">';
					$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');
					if( $avatars_Plugin )
					{
						$avatar = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'default' );
						if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
						{
							?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the site of this post" style="float:right;" /><?php
						}
					}
					echo '</a>';

category-avatar


					echo '<a href="'.regenerate_url( 'cats,catsel', 'cat='.$Item->main_cat_ID ).'" title="Go to the category of this post">';
					$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');
					if( $avatars_Plugin )
					{
						$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' );
						if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
						{
							?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the category of this post" style="float:right;" /><?php
						}
					}
					echo '</a>';

And another thing btw, I want it to give more favor to the blog-avatar or to cancel out the category-avatar "if" the category's blog have a blog-avatar.

If I just put the two codes together, it shows the blog-avatar and the category-avatar (if both have avatars).

Thanks!!

92 Jan 23, 2007 09:51

$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars'); 

only needs to be run once, probably the best thing to do is stick that right up the top of your skin file (this thought only crossed my mind then).

And it's nice that you are following the b2evo's standards :D, but $Items_Blog should be $Item_Blog we ignore "'s" in programming. I'll mod the wiki to state this.

for the 2nd part, the cancelling out, you can do this;

$avatar_exists = !is_null($avatar) && $avatar['name'] != 'no_avatar';

If the avatars are to be displayed in the same spot, like you want to completely combine the code you can do;


$avatar_blog = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'default' );
$avatar_blog_exists = !is_null($avatar_blog ) && $avatar_blog ['name'] != 'no_avatar';
if ( $avatar_blog_exists )
{ // you echo of the link and avatar here for the blog avatar
} else
{ // the above but for the category avatar
}

Hope that makes sense....

93 Jan 23, 2007 11:03

Hi,

Thanks a bunch!!

Seems to be working fine...

The code I used:


					$avatar_blog = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'default' );
					$avatar_blog_exists = !is_null($avatar_blog ) && $avatar_blog ['name'] != 'no_avatar';
					if ( $avatar_blog_exists )
					{ // you echo of the link and avatar here for the blog avatar
						$Item_Blog = & $Item->get_blog();
						$Item_Blog_url = $Item_Blog->get('url');
						echo '<a href="'.$Item_Blog_url.'" title="Go to the site of this post">';

						if( $avatars_Plugin )
						{
							$avatar = $avatars_Plugin->get_avatar( $Item->blog_ID, 'blog', 'default' );
							if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
							{
								?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the site of this post" style="float:right;" /><?php
							}
						}
						echo '</a>';
					}
					else
					{ // the above but for the category avatar
						echo '<a href="'.regenerate_url( 'cats,catsel', 'cat='.$Item->main_cat_ID ).'" title="Go to the category of this post">';

						if( $avatars_Plugin )
						{
							$avatar = $avatars_Plugin->get_avatar( $Item->main_cat_ID, 'category', 'default' );
							if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
							{
								?><img src="<?php echo $avatar['url']; ?>" alt="Click to go to the category of this post" style="float:right;" /><?php
							}
						}
						echo '</a>';
					}

This part:


$avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');


I put it at the top of the skin after the <html>

Here's the live site:
http://v2.philgaming.com (soft launch)

Thanks a lot!!

:D :D :D

94 Jan 31, 2007 08:59

Tomorrow I will release v0.4. It's basicly a rewrite of 0.3 to include the new function libraries that I have avaliable.

Important changes:
no_avatar, or no_image are now called 'default', so you will be using 'default.ext'.

New features:
You can now have default images for avatar types, avatar folders (skins) instead of just one.

Minor changes:
Item is no longer passed over by reference in get_avatar

I'm currently undergoing a update on my server, so check it in about 30 mins where you can see the new version as well as the new 1.9.2 avatar enabled tictac skin :)

95 Apr 25, 2007 12:40

dear members of this board,

Sorry for bringin up a rather old topic, but I need some help with this plugin.

What I want to do is show avatars by category, not by user. I know it is possible with your plugin, but I just cant get it to work.

the code I used is (thus connecting is to the poster):


         <?php
            if ( !isset($avatars_Plugin) )
               $avatars_Plugin = & $GLOBALS['Plugins']->get_by_code('evo_avatars');
            if( $avatars_Plugin )
            {
               $avatar = $avatars_Plugin->get_avatar( $Item, '', 'tictac' );
               if ( !is_null($avatar) /*&& $avatar['name'] != 'no_avatar'*/ )
               {
                  echo '<img '.
                        'class="avatar avatar_user" '.
                        'title="'.T_('Author').'; '.$Item->creator_User->preferred_name('htmlattr',false).'" '.
                        'alt="Author\'s Avatar" '.
                        'src="'.$avatar['url'].'" '.
                  '/>';
               }
            }
         ?>

I was hoping someone would be able to help me with this. I tried the above, but I'm too of a rookie to understand what to do.

Thanks for your help, and your wonderful plugin!

Regards,
Emile

97 Apr 28, 2007 08:13

where are the most up to date instructions on how to install this plug in. What you say above seems to differ from the read me file DL'd with the plugin. The read me mentions reference to only placing code in one place in the _main.php

98 Apr 30, 2007 14:12

The instructions inside the readme should work, the code snippits i've posted are for customizations of the plugin.

99 Apr 30, 2007 15:38

thanks - I've got it working now.

100 May 25, 2007 19:09

I have been trying my best to install this plugin and have tried to use previous posts in this thread to help me.

I keep getting the failed to install message

I copied and moved the /avatar_plugin/avatars folder to the blog/media folder, but I had to create a folder called /avatar_plugin but with or without me creating it, it still failed.

I'm not usually a dunce at this sort of thing, but I have come to the end of what I think I can do.

Can anyone help me?

101 May 25, 2007 19:32

Damaged, sorry to hear about your hard time with the plugin, could you tell me what exactly is going on (eg. error messages etc), and what you've tried.

I've decided that I will work on a v1 release of this plugin in july (during my holidays) do to the popularity and usability problems with the current release.

102 May 25, 2007 19:52

I uploaded the /avatars_plugin/ folder into the /blogs/plugins/ directory as per the instructions in the readme. I received an error message 'The installation of the plugin failed'.

So then I looked through this thread and saw that you suggested
balupton wrote:

Ok if that happens, just copy the /avatars_plugin/avatars/ to /blogs/media/avatars_plugin/ and it should work then...

So I copied the /avatars_plugin/avatars/ to the media folder, /blog/media/avatars/ and tried to install. I recieved the same error message.

So I thought maybe I had to create a /avatar_plugin folder in /media to put /avatar in. So I did that and tried to install and it failed, with the same error message.

I'm probably being a complete tard here, I don't usually struggle like this, and I hope I havent over explained too much :P Oh and I am using version b2evolution 1.8.6.

Thanks.

103 May 25, 2007 20:03

So I copied the /avatars_plugin/avatars/ to the media folder, /blog/media/avatars/ and tried to install. I recieved the same error message.

Hrmm, that is the correct action to take....

So I thought maybe I had to create a /avatar_plugin folder in /media to put /avatar in. So I did that and tried to install and it failed, with the same error message.

Undo this step, and just keep the previous step. And open /blogs/conf/_advanced.php and set $debug to 1, and then do the install again, you will see a lot of junk at the bottom of the page, and you can either cycle through it to find if you found anything useful to help me, or just send me the entire lot and i'll cycle through it and find what i need.

104 May 25, 2007 20:14

I did what you asked and here's the result. I don't know enough to go through myself.

Edit: I should have said I did step one again with the result being 'The installation of the plugin failed'

balupton: ta.

Thank you for helping me btw, I appreciate it immensely.

105 May 25, 2007 20:42

i went through it and nothing there helped me at all, would you be able to make me an admin account for your blog and pm me the details?

107 May 27, 2007 16:53

I installed the avatars plugin and I'm encountering an issue writing to the /media/avatars_plugin directory. For example, if I try to upload an image file to the /default or /custom folders, I get an "access denied" error in my ftp client. I have tried changing the permissions on the /media/avatars_plugin directory but strangely I am not permitted to do this. Permissions are currently 755. I also tried changing the permissions in cpanel but got an error there as well.

Has anyone run into this problem? Is there a way around it - like pointing the plugin to a different path to access avatar files?

108 May 27, 2007 21:02

Try 777. And apply to all subfolders of, and to the /media/avatars_plugin/ folder.

109 May 31, 2007 01:55

Thanks for the info. I had to ask my web hosting company to change the permissions for me as I kept getting errors when I tried to do so. I can now upload images. This is great!

Perhaps you can help me with a question about how users can upload their own images. As someone who has FTP access to the web server, I can upload images to the /media/avatars_plugin/default/user/ directory and rename the images so that they correspond to a user's id. There doesn't seem to be any way for a user to upload an image to a directory that they have access to and use that as their avatar, however. Is this correct? Also, is there a way to point the plugin to a different image path - for example, to the user's directory under /media?

Thanks for your help.

110 May 31, 2007 06:28

Robrockley, yes thats true, only people with ftp access can upload avatars, eg. the blog admin. v1, that is going to be released in july will allow for users to upload avatars.

For the 2nd part of your question regarding changing the avatars path, could you elaborate on what you want? Like do you want to grab a user's avatar out of their media dir?

for those of you who were interested in damaged's problem, the /media/avatars_plugin/ folder was not named correctly.

111 Jul 13, 2007 00:44

Currently working on new version, you guys will be amazed.

112 Jul 15, 2007 18:20

Here we go

   v1.0.0.0-beta (15/07/2007 @ 19:59 (GMT+08:00))
	* Nearly complete re-write, so it finally completes my dream of what the avatars plugin should be!
	* Removed customizability of avatar_types (no one used it, and no one cares)
	* Added ability to upload avatars within b2evolution
	* Hacked up administration so avatars are displayed for post and user browsing
	* Avatars include the small image, and a optional large image
	* Large and Small images have customizable sizes and resize modes
	* Large avatars include lightbox functionality!
	* Built from my Sample Renderer Plugin and some parts of my Gallery Plugin

This is a pre-release, so please test it out, give feedback, so official release can be made.

See it in action here: http://packages.balupton.com/b2evolution/index.php?blog=3

113 Jul 27, 2007 21:04

Version 1 has been released, get it from the first post.

114 Jul 31, 2007 09:42

I seem to have a bit of a problem getting my avatar to show up.

I followed the installation instructions and everything seems right, but when I try to post and upload my avatar, I get nothing...Just the Admin avatar...Is there something I'm missing?

My Blog can be seen at http://marc-payumo.com/journal/

Thanks to any that can help!

115 Jul 31, 2007 12:35

Which version did you install? The version 1 release(s) are quite different, and that admin avatar is from the pre version 1 releases...

116 Jul 31, 2007 16:23

the readme says 1.0.1.0 - beta released 30/07/2007.

- ooop, upon reinstalling it works

117 Jul 31, 2007 16:58

:)

Is there anything you think I could improve on to make it better? I will be releasing a better tutorial shortly on how to implement it into the skin.

118 Aug 05, 2007 21:07

This new version of the plugin is fantastic and has some really great features, particularly that of allowing users to upload their own avatar. Props on developing this, balupton.

I have been running into two issues in the Admin area and I wanted to see if anyone else is experiencing the same issues and hopefully get some tips on how to resolve. I am running version 1.9.3 of B2Evolution.

(1) When logging in as Admin and going to App Settings -> Plugins and then choosing to edit the Avatars plugin, I get the following error when I click 'Save' regardless of what changes I make in the form or even if I don't make any changes at all:

Warning: Missing argument 1 for getdefaultsettings() in /home/link/public_html/blog/blogs/plugins/avatars_plugin/_avatars.plugin.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /home/link/public_html/blog/blogs/plugins/avatars_plugin/_avatars.plugin.php:97) in /home/link/public_html/blog/blogs/inc/VIEW/_menutop.php on line 39

2) In IE only, if I log in to the Admin area as a regular user and navigate to any section where the Avatar upload form is displayed (My profile, Blog settings -> Display,etc.), I get the following error:

Internet Explorer cannot open the Internet Site ... Operation aborted

In Firefox - and every other browser I've tried except IE - this error does not occur.

Any ideas?

120 Aug 06, 2007 18:24

That's certainly a persuasive argument to upgrade to 1.10:

you want to do that upgrade and you want to do it now. Not tomorrow and certainly not next week

I do plan on upgrading but I need to think it through a bit as I have made quite a few modifications to my b2evo installation, some of which are not officially supported.

Anyhow, thanks for the tip, balupton. I think for now I may roll back to the previous version of the plugin.

121 Aug 09, 2007 21:32

v1.0.2.0-beta is now out.

   v1.0.2.0-beta - 10/08/2007 @ 03:07 (GMT+08:00)
   	* Updated the get_avatar function, now returns $avatar['exists'] and $avatar['skin'] and $avatar['avatar'] (which is always true)
	* Updated get_avatar_display to
		function get_avatar_display ( $avatar, $style = '', $before = '', $after = '', $none = '' )
	* Fixed admin avatar displays when 'Display Default Avatar' is disabled
	* Updated skin.txt to reflect latest changes

122 Aug 16, 2007 05:26

I just installed the latest version and keep getting the "The installation of the plugin failed." error. I tried copying the avatars_plugin/avatars folder to media/blog/avatars_plugin/avatars as well as media/avatars_plugin/avatars. Neither directories worked.

123 Aug 16, 2007 17:08

Make sure your media directory has 777 permissions. If you have tried, try downloading the ftp client FlashFXP as it is what I use and can guarantee that sets permissions correctly.

124 Aug 24, 2007 19:41

I am reading the skin.txt of 1.0.2.0-beta and I am confused on which page i need to add the new script in my skin, there is not an instruction on where to place these like on the install.txt

All i really want is an avatar for the author the post and avatars for anyone who posts a comment, i do not need avatars for the categories or anything else like that.

125 Aug 24, 2007 19:53

I've attached the modified files in the attached zip file, so just replace your existing ones with them.

Then continue installation steps 4 and 5.

And in your skin's _main.php file use

	if ( isset($avatars_Plugin) && ($avatar = $avatars_Plugin->get_avatar( 'user', $Item )) !== NULL )
	{	// Avatar plugin is enabled and we have a avatar to display
		echo $avatars_Plugin->get_avatar_display($avatar);
	}

to display authors avatar of the current post.

126 Aug 30, 2007 20:53

I have an earlier post in this thread regarding problems that I was experiencing with the 1.0.2 version of the Avatars plugin in version 1.9.3 of b2evo. Everything was fine in Firefox/Mozilla but I experienced some problems in IE with some admin pages.

I went ahead and did the upgrade to version 1.10 of b2evo then removed and re-installed version 1.0.2 of the Avatars plugin. I'm still experiencing a problem in IE with any admin page where Avatar settings can be edited. For example, logging in to admin area as a user and going to My Profile. The error that I get in IE is a popup window that says "Internet Explorer cannot open the Internet Site ... Operation Aborted". If I disable the plugin, I no longer get the error in IE. Everything works perfectly in Firefox/Mozilla.

Has anyone experienced the same issue in IE? If I'm the only one then perhaps there is a conflict with another plugin?

127 Aug 30, 2007 22:32

Sorry I have been totally caught up with work the past few weeks, it has been insane, and then I have a week of full on study to do next week.

I will look into it as soon as I can.

128 Sep 02, 2007 04:56

I don't see where to add the code in the _main.php file?
I am using the skin Purple Beauty if that matters. But if you can tell me where to add the various lines of code I can do it myself.

Also in the admin area when I click on my Category there is no function to select the image to associate with that avatar.

Thx

*edit: I found the other instructions in the install.txt file but I can't find the line of code that you indicate to make look like the hack3.txt file I'm guessing this will make the settings appear in the admin area?

129 Sep 02, 2007 21:26

Which version of b2evolution are you using? This plugin is only for v1.10.2

130 Sep 03, 2007 18:10

That's what version I am using

131 Oct 11, 2007 19:27

works fine for me, thanks for this plugin :)
cu

132 Oct 12, 2007 13:59

I've used the avatars plugin on www.doggablog.com if anyone's interested - I put in a thing so people can update their image through a form, and also coded a thing that lets you email your image to be automatically processed and added to your profile (for people who have problems with uploading)

I'd like to know what you think... and thanks to the developer!

134 Oct 25, 2007 02:57

If it installed fine, did you also apply the needed hacks to b2evolution?

135 Oct 25, 2007 09:46

balupton wrote:

If it installed fine, did you also apply the needed hacks to b2evolution?

hi
balupton

thank'you very much, but how can i apply these hacks? where are the right hacks to apply at avatars plugin?

i use the 1.10.2 "Florida" 2007-06-08 Stable version of the blog

136 Oct 25, 2007 09:54

There should be a installation.txt inside the avatars_plugin folder which provides the instructions.

137 Oct 25, 2007 11:45

balupton wrote:

There should be a installation.txt inside the avatars_plugin folder which provides the instructions.

thank you balupton,

i'll try more later and i'll tell you.

bye

138 Oct 25, 2007 16:54

hi balupton,
I want to make obligatory for my bloggers to have an avatar set to write posts.
I know how to make the condition and the redirection to the profile editing screen, but I dont know where to do this.

Would you be so kind to indicate me where to work to achieve this?
Thanks in advance.

david

139 Oct 25, 2007 17:20

balupton wrote:

There should be a installation.txt inside the avatars_plugin folder which provides the instructions.

hi balupton,

i made what you've wrote.
but when i go into the users admin page and i click on a user link,
for example the "admin" user, to set an avatar image,

(http://www.myweb.xx/blogs/blogs/admin.php?ctrl=users&user_ID=1)

i get an internet Explorer error than doesn't let me work and it redirects me into a classic internet explorere error page.
what happens?

140 Oct 25, 2007 17:39

ercolinox, Could you pm me your blogs admin details so I can take a look?

OSdave, Do you want to display any messages to the user saying that they need to have a avatar to make a post? Or just do a redirect?

141 Oct 25, 2007 17:43

well, the ideal would be with a message.
but it's not very important because I would tell them before in the registration mail. Let's say with a message, it's more fun :lol:

142 Oct 25, 2007 17:55

balupton wrote:

ercolinox, Could you pm me your blogs admin details so I can take a look?

OSdave, Do you want to display any messages to the user saying that they need to have a avatar to make a post? Or just do a redirect?

ok, i've sent
thank's

143 Oct 25, 2007 21:55

Hey,

is it possible to make your plugin working under 2.0.2? That would be nice :)

Greetz

Tears

144 Oct 26, 2007 10:19

Tears_of_Hate, no. When v2 comes final, I will release a update.

OSdave, Well a message annoys things, you could try this. At the top of _admin_area.php add


		<?php if ( $this->get_avatar('user', $GLOBALS['current_User']->ID) == NULL ) { echo 'alert("You need to have an avatar for your user."); document.location = "'.$GLOBALS['admin_url'].'?ctrl=users&user_ID='.$current_User->ID.'";'; } ?>

ercolinox, I will look at it when I can :)

145 Oct 26, 2007 10:29

balupton wrote:

Tears_of_Hate, no. When v2 comes final, I will release a update.

OSdave, Well a message annoys things, you could try this. At the top of _admin_area.php add


		<?php if ( $this->get_avatar('user', $current_User->ID) == NULL ) { echo 'alert("You need to have an avatar for your user."); document.location = "'.$GLOBALS['admin_url'].'?ctrl=users&user_ID='.$current_User->ID.'";'; } ?>

ercolinox, I will look at it when I can :)

hi balupton,

thank you very much

146 Oct 26, 2007 10:45

Whoops noticed a problem, I've updated the code in the previous post.

147 Oct 26, 2007 11:45

hi balupton, and thank you one more time for your support.
With your indications I have been able to do it. Here is the code that you have to add at the beginning of _admin_area.php:

  global $current_User;
  $avatar = $this->get_avatar('user', $Item);
  if ( ( $avatar['exists'] == 'false' ) && ( $_SERVER['QUERY_STRING'] != 'ctrl=users&user_ID=' . $current_User->ID ) ) { echo '<script language="JavaScript">alert("You need to have an avatar for your user."); document.location = "'.$GLOBALS['admin_url'].'?ctrl=users&user_ID='.$current_User->ID.'";</script>'; } ?>

I repeat, I'm very gratefull for your work, I'll be waiting for nexts!
cheers
david

148 Nov 20, 2007 18:07

robrockley wrote:

I have an earlier post in this thread regarding problems that I was experiencing with the 1.0.2 version of the Avatars plugin in version 1.9.3 of b2evo. Everything was fine in Firefox/Mozilla but I experienced some problems in IE with some admin pages.

I went ahead and did the upgrade to version 1.10 of b2evo then removed and re-installed version 1.0.2 of the Avatars plugin. I'm still experiencing a problem in IE with any admin page where Avatar settings can be edited. For example, logging in to admin area as a user and going to My Profile. The error that I get in IE is a popup window that says "Internet Explorer cannot open the Internet Site ... Operation Aborted". If I disable the plugin, I no longer get the error in IE. Everything works perfectly in Firefox/Mozilla.

Has anyone experienced the same issue in IE? If I'm the only one then perhaps there is a conflict with another plugin?

hi there,
I have the exact same problem as describe by robrockley: everything fine with FF, but if I try to go to the profile page with IE, I get the message and a very ugly IE screen :'(
robrockley, have you been able to get that working?
balupton, would you have time to look into that issue? (if you need it, just ask me for url, login and password.)
As far as I can see, the problem comes from the javascript part of avatars_plugin\_admin_area.php (if i delete it, the page loads ok, but I can't save the changes)
See you.
david

ps: my b2evo version: 1.10.2, my IE version: 7.0.5730.13

149 Nov 21, 2007 00:53

Hello. Sorry for my late reply, I have been extremely busy. This issue is to do with the scriptaculous library, and will be fixed hopefully by Monday, thanks to a "sponsor" you could say.

150 Nov 21, 2007 11:48

please balupton, don't be sorry. Besides, an answer on the same day, that's not what I call a "late reply" ;)
See you next week then :)

152 Nov 24, 2007 12:19

Man I get in here and get all caught up in trying to change all these codes and dont know what the heck Im doing! Please say it will get easier!

I managed to get it to work on an older version I had but it would never let me change the pics. It would always say the permission was denied to change the 1.jpg. So I just left it uninstalled. I got the new version here handy and many these hacks are just beyond me!

I know Im a total novice and should be sent to a island with all other ignorant people!

153 Nov 28, 2007 12:07

balupton wrote:

Hello. Sorry for my late reply, I have been extremely busy. This issue is to do with the scriptaculous library, and will be fixed hopefully by Monday, thanks to a "sponsor" you could say.

hi balupton,
I don't want to be a pain in the ***, but do you know something about the IE issue?

154 Nov 28, 2007 22:30

OSdave, the quote you used is talking about the same issue. I am working on the fix now.

155 Dec 02, 2007 02:45

Ok, a little heads up. The new version is all finished and done. Here is the changelog.


   v1.1.0.0-beta - 05/12/2007 @ 10:37 (GMT+08:00)
   	* Uses the newest resource library
	  * Now supports all supportable types of images
	* Uses jQuery v1.2 (Older versions uses prototype and scriptaculous)
	  * This fixes all the wierd bugs, like the page not displaying, or buttons not working
	* Uses jQuery Lightbox Plugin (v0.2.1-beta)
	* Now there is a option on uninstall if you want to keep the avatars
	* Support / Credit-Link now obeys the setting
	* Now actually supports IE... Can't believe it didn't support it before!
	^ Note: A special thanks needs to go out to Sue Kendrick (http://www.suekendrick.co.uk) from (http://writelink.co.uk) for sponsoring this release.

Expect a release within the next few days.

Oh and this version will be incompatible with my other plugins... (Well for now it is).

157 Dec 10, 2007 12:44

hi balupton,
indeed it works now with IE, as well as with firefox.
And you were right, now gallery isn't working.
I've just make the try in localhost, as my online version is already open to public, I mean to firefox public :)

I'll wait to update for gallery too as it makes my blog so much cooler :lol:

Thanks again for this great work

158 Jan 03, 2008 11:26

Hello balupton. Does the current version support 2.30? I use the old version 0.300 and I found that I could use it with b2evolution 2.30. Was little currius about the newest release. Would be nice to have avatars as a widget.

159 Jan 03, 2008 12:02

No, I started work on the 2.3 compatible version a few nights ago.

161 Jan 09, 2008 15:25

Balupton:
Can I change the sizes of the large and small avatars?
I wish to use 24x24 for the small avatars, but the plugin do not allow me.

162 Jan 31, 2008 03:57

hey quick question i made a summery.php and i was wondering if there is away to show the users avatar next to each post this is the code that i used but it didnt seem to work.. nothing showed up. any ideas? i have the avatar plugin installed on the site itself and works fine on the main blog.


<?php
/**
 * This is a demo template displaying a summary of the last posts in each blog
 *
 * If you're new to b2evolution templates or skins, you should not start with this file
 * It will be easier to start examining blog_a.php or noskin_a.php for instance...
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package evoskins
 * @subpackage noskin
 */

/**
 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not
 * trying to initialize any particular blog
 */
require_once dirname(__FILE__).'/conf/_config.php';

require_once $inc_path.'_main.inc.php';

header( 'Content-type: text/html; charset='.$io_charset );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	background-color: #26241F;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a {
	font-size: 10px;
	color: #FFFFFF;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #FFFFFF;
}
a:hover {
	text-decoration: none;
	color: #FFFFFF;
}
a:active {
	text-decoration: none;
	color: #FFFFFF;
}

OL, OL LI
{
margin:0;
padding:0;
list-style-position: inside;
}
.entry-content ul, ol {margin: 0}
ul {margin-left:1.25em;padding-left:0}
.style1 {
	color: #FF9900;
	font-weight: bold;
}
-->
</style></head>

<body>
<?php // --------------------------- BLOG LIST INCLUDED HERE -----------------------------
	$display_blog_list = 1; // forced

	# this is what will start and end your blog links
	//$blog_list_start = '<div class="NavBar">';
	//$blog_list_end = '</div>';
	# this is what will separate your blog links
	$blog_item_start = '';
	$blog_item_end = '';
	# This is the class of for the selected blog link:
	$blog_selected_link_class = 'NavButton2';
	# This is the class of for the other blog links:
	$blog_other_link_class = 'NavButton2';
	# This is additionnal markup before and after the selected blog name
	$blog_selected_name_before = '<span class="small">';
	$blog_selected_name_after = '</span>';
	# This is additionnal markup before and after the other blog names
	$blog_other_name_before = '<span class="small">';
	$blog_other_name_after = '</span>';
	// Include the bloglist
	//require( $skins_path.'_bloglist.php');
	// ---------------------------------- END OF BLOG LIST --------------------------------- ?>
    
    <?php // --------------------------- BLOG LIST -----------------------------
	for( $blog=blog_list_start();
				$blog!=false;
				 $blog=blog_list_next() )
	{ # by uncommenting the following lines you can hide some blogs
			 if( $blog == 1 ) continue; // Hide blog recent storys...
		 if( $blog == 2 ) continue; // Hide blog Reviews...
		// if( $blog == 3 ) continue; // Hide blog News...
		if( $blog == 4 ) continue; // Hide blog Rants...
		?>
<h3><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>" title="<?php blog_list_iteminfo( 'shortdesc', 'htmlattr'); ?>"><?php blog_list_iteminfo( 'name', 'htmlbody'); ?></a></h3>
		
		        
		          <?php	// Get the 3 last posts for each blog:
			$BlogBList = & new ItemList( $blog,  '', '', '', '', '', array(), '', 'DESC', '', 8, '', '', '', '', '', '', '', 'posts' );

			while( $Item = $BlogBList->get_item() )
			{
			?>
		          <table width="200" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <th scope="col"><?php // TO INCLUDE THE USER'S AVATAR OF THE CURRENT POST USE:
	if ( isset($avatars_Plugin) && ($avatar = $avatars_Plugin->get_avatar( 'user', $Item, 'tictac' )) !== NULL )
	{	// Avatar plugin is enabled and we have a avatar to display
		echo $avatars_Plugin->get_avatar_display($avatar);
	}?><?php // TO INCLUDE THE POST'S AVATAR OF THE CURRENT POST USE:
	if ( isset($avatars_Plugin) && ($avatar = $avatars_Plugin->get_avatar( 'post', $Item, 'tictac' )) !== NULL )
	{	// Avatar plugin is enabled and we have a avatar to display
		echo $avatars_Plugin->get_avatar_display($avatar);
	} ?></th>
                            <th scope="col"><div align="left"><span class="style1">»</span>
                              <?php //$Item->issue_date() ?>
                              <?php $Item->permanent_link( '#title#' ) ?>
                                <span class="small">
                                <?php //$Item->lang() ?>
                                  </span>
                            </div>
                            <?php
			}
			?></th>
                          </tr>
                        </table>
<li><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>"><?php echo T_('More posts...') ?></a></li>
		
		
		  <?php
	}
	// ---------------------------------- END OF BLOG LIST --------------------------------- ?>

</body>
</html>

to see it go here http://www.blog.gameflak.com/summary3.php

163 Feb 27, 2008 18:58

Hello everybody,

I installed the avatar plugin with version 1.10.2
I got no problem to install it but with I.E 7 it doesn't work. In fact, i see the plugin, i can click to upload an image but it soesn't work ! The image is not uploaded. This problem doesn't appear with firefox. What should I do ? Thanks and sorry for my english !

164 Mar 10, 2008 22:06

Hello everybody,

I installed the avatar plugin with version 1.10.3

I got problem with IE 7. In administration works only in Write section. in others I get pop up message:
IE cannot open the Internet site
http:....
operation aborted

page is displayed, but it redirect me after I click OK

166 Mar 20, 2008 03:45

The 1.1.0.0-beta version can't handle PNG images on PHP5.

imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in...

Since PHP v5.1 the GD function imagepng() accepts compression argument. The compression argument must be from 0 to 9.

But the plugin is using quality = 95

BTW there was no problem in 1.0.2.0 version

Another thing is a file extension, the plugin doesn't lowercase it. When I upload image.JpG it is converted to 1.JpG, but the plugin is searching for 1.jpg to show.

167 Mar 22, 2008 17:34

I am using b2 v2.4.0 and am having trouble with my avatar plugin. I have installed but when I click on it I get nothing. Are there any instructions for this version? I understand I cannot upload avatars either? How can I get them? May I allow users to register with a profile picture? Thanku!

168 Mar 22, 2008 17:52

To ats180

It doesn't work on 2.x system

169 May 15, 2008 10:22

it'd be very cool if balupton or someone else had the time to adapt it to 2.x ;)


Form is loading...