Firefox PHP

Module: User Avatar

Posted by Maurice Makaay 
Re: User Avatar without Cookies
January 05, 2008 08:36PM
But I need to know how that is a problem. If you open the image URL on its own, you will see that it works. One would suspect that the same URL inside an <img> tag would work too then.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: User Avatar without Cookies
January 05, 2008 08:43PM
Hello Maurice,
look at this link:
[test.clever-forum.de]

Where is only shown the alttext insted the avatar.
The embeded Image don't shown

Go in the adminarea and llok about the general settings.

Thanks
Berti

I speek swabian and german very well - not english :-(

My Phorum on [clever-forum.de]

My testfforum with version 5.2.x is on [test.clever-forum.de] (user: Phorum password: Clever)
Re: User Avatar without Cookies
January 05, 2008 08:55PM
I already know that bit. That what I tested before with cookies disabled in my browser. The alt tag shows, not the image. Normally a sign that the image is broken. Then you right click and do a "view image". The image shows. Click the back button and it is also visible in the page. Do a page reload and the image is gone again.

So far the symptoms. No idea on a solution yet.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: User Avatar without Cookies
January 05, 2008 09:01PM
Hello Maurice,
the most registred users use cookies :-)
You and the other have a lot of time to find a solution...
i update finaly not before 1 or 2 weeks.
My new templates must be finished first.

Thanks
Berti

I speek swabian and german very well - not english :-(

My Phorum on [clever-forum.de]

My testfforum with version 5.2.x is on [test.clever-forum.de] (user: Phorum password: Clever)
Re: Module: User Avatar
January 06, 2008 10:18PM
"2008-01-08 3.0.2 Maurice Makaay"

Say what? Today is January 6th, according to my calendar... You updating in the future, Maurice? :)

Anyway, that's not why I am posting. I seem to have a problem with getting this mod to work. I've uploaded the module, put the files in the correct place (and edited the read.tpl, by I never get to that stage), but the option to upload or select avatars never shows up for my user in the Control Panel. Conversely, I cannot get the "My Files" menu item to go away, even though I have disabled uploading of files in the General Options.

I'm sure I am missing something... but what?

I've attached an image showing what the control panel looks like, for reference. The avatar options link should be showing up under the Change Password option, as far as I can tell.

--
Niels Callesoe

Basic Phorum user.


Re: Module: User Avatar
January 06, 2008 10:24PM
thats the "classic" template missing some stuff, emerald and lightweight should work correctly.
I guess maurice can post the missing bits ;).


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: User Avatar
January 06, 2008 10:34PM
To make the menu item visible, ddit cc_menu.tpl.
Add the "tpl_cc_menu_options_hook" hook:
{LANG->Options}
  <ul>
    <li><a {IF PROFILE->PANEL "forum"}....
    <li><a {IF PROFILE->PANEL "password"}....
    {HOOK "tpl_cc_menu_options_hook"}
  </ul>

And for completeness also the "tpl_cc_menu_moderator_hook" hook:
      {IF GROUP_MODERATOR}
        <li><a {IF PROFILE->PANEL "membership"}....     
      {/IF}
      {HOOK "tpl_cc_menu_moderator_hook"}
    </ul>

I added them in the repositories, so they will be included in the next release by default.

The file upload menu is always visible for you, because you are an administrator. Other users will not see it if you disabled the file upload feature in the admin interface.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: User Avatar
January 11, 2008 04:46PM
An example of implementing avatars in the classic template:
# diff -u ../classic/read.tpl read.tpl
--- ../classic/read.tpl 2008-01-10 10:45:28.000000000 +0100
+++ read.tpl    2008-01-11 16:35:39.000000000 +0100
@@ -25,6 +25,11 @@
       {ELSE}
         <div class="PhorumReadBodyHead"><strong>{MESSAGES->subject}</strong> <span class="PhorumNewFlag">{MESSAGES->new}</span></div>
       {/IF}
+    {IF MESSAGES->mod_user_avatar}
+       <table><tr><td>
+        <img src="{MESSAGES->mod_user_avatar}" alt="" style="float: left;margin-right: 5px;" />
+       </td><td>
+    {/IF}
       <div class="PhorumReadBodyHead">{LANG->Postedby}:
         <strong>
           {IF MESSAGES->URL->PROFILE}<a href="{MESSAGES->URL->PROFILE}">{/IF}
@@ -32,6 +37,9 @@
           {IF MESSAGES->URL->PROFILE}</a>{/IF}
         </strong> ({MESSAGES->ip})</div>
       <div class="PhorumReadBodyHead">{LANG->Date}: {MESSAGES->datestamp}</div><br />
+    {IF MESSAGES->mod_user_avatar}
+       </td></tr></table>
+    {/IF}
       <div class="PhorumReadBodyText">{MESSAGES->body}</div><br />
       {IF MESSAGES->attachments}
         {LANG->Attachments}:

--
Niels Callesoe

Basic Phorum user.
Re: Module: User Avatar
April 06, 2008 11:38PM
Quote
mmakaay
To make the menu item visible, ddit cc_menu.tpl.
Add the "tpl_cc_menu_options_hook" hook:

Have same problem: custom template, module works but I can´t make it appear in the CC menu.
I followed your steps and not working. Should I simply add manually a link to the right URL?

Thanks!
Re: Module: User Avatar
April 06, 2008 11:43PM
This really should work by adding the {HOOK} code to the control center code in your template. Feel free to hack in the URL manually, but I don't see a reason for doing that. What exact version of Phorum are we looking at? What's the exact code that you added to your cc template?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login