I would like to know if it's possible to let user upload only one avatar and use it for the "avatar" module of "member list (profile1.2)" AND pnphpbb2 forum.
Is it possible or the two profile MUST stay separated? :(
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
[SOLVED] MOD to use the Avatar 2.1 module pics into PNphpBB2
-
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
you could probably override the templates in pnphpbb2 (assuming there are some) and change tha call to the zikula avatar. -
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
I installed avatar 2.1 module, but it doesn't work :(
Does it create a SQL table?
I can't find it.
I have to investigate why doesn't work selecting an avatar (i select it but then doesn't happen, user is still without avatar) -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
-
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
Yes, I changed a propriety from viewable by "everyone" to viewvable by "only registered user" just right now,
why do you ask it? -
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
If from admin panel I click "view user that use this avatar" zikula says:
"Exit-Handler: Exiting after SQL-error"
In the top of the theme (above zikula's header) says:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND pn_uda_value="002.gif"' at line 1
SELECT pn_uda_id AS "uda_id",pn_uda_propid AS "uda_propid",pn_uda_uid AS "uda_uid",pn_uda_value AS "uda_value" FROM pn_user_data AS tbl WHERE pn_uda_propid= AND pn_uda_value="002.gif""
Does anyone know the name of the table that create tha avatar module 2.1?
Is it "pn_uda_propid" ?!
If so: this module does not create the table, here is the problem :(
edited by: lordevol, Apr 22, 2009 - 07:43 PM -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
lordevol
Yes, I changed a propriety from viewable by "everyone" to viewvable by "only registered user" just right now,
why do you ask it?
no - I mean in your personal profile - can you edit anything and make it "stick" (for example, your real name or AIM info).
I ask because this site had the same trouble for a while and we hashed that out on the forums around here somewhere. Everyone's avatars were messed up and couldn't change them...
could be a permissions problem for where you are uploading the avatars to... -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
craigh
I ask because this site had the same trouble for a while and we hashed that out on the forums around here somewhere.
here is that discussion -
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
Thaks for your help, but the profile module is ok,
I can change and store every field,
this is an avatar module problem :(
So it's better opening a new topic -
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
I solved the problem with the avatar module.
So I can go on with this project: use the avatar loaded with the avatar 2.1 module in the pnphpbb2 view_topic template.
Today I understood that pnphpbb2 does not use pnrender, so I can't clone the way that "other module" calls those images:
in the .php file:
Code
// display
$pnRender = pnRender::getInstance('Avatar', false, null, true);
$pnRender->assign('avatars', $avatars);
$pnRender->assign('allow_uploads', $allow_uploads);
$pnRender->assign('user_avatar', pnUserGetVar('user_avatar'));
$pnRender->assign('allavatarscount', $allavatarscount);
$pnRender->assign('page', $page);
$pnRender->assign('perpage', $perpage);
and in the template:
Code
<!--[$pncore.user._YOURAVATAR|pnvarprepfordisplay]-->
So how can I get access to that img-URL from a non pnrender module in zikula? Anyone have an idea?
edited by: lordevol, Apr 24, 2009 - 02:09 PM -
- Rank: Softmore
- Registered: Oct 17, 2008
- Last visit: Oct 21, 2009
- Posts: 163
I'm very happy, now I can take the Avatar 2.1 module pics on the pnhpbb2 module!
Example: show the Avatar 2.1 pics into into the pnphpbb2 member list:
PHP
file modules/PNphpBB2/memberlist.php
from:
Code
$template->assign_block_vars('memberrow', array(
'ROW_NUMBER' => $i + ( $start + 1 ),
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
/* Begin PNphpBB2 Module */
/* 'USERNAME' => $username, */
'USERNAME' => pnVarPrepForDisplay($username),
/* End PNphpBB2 Module */
'FROM' => $from,
'JOINED' => $joined,
'TERM_IMG' => $member_term_img,
'POSTS' => $posts,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
to:
Code
/* Mia modifica */
$numeroutente=pnUserGetIDFromName($username);
$nomefileavatar = pnUserGetVar('_YOURAVATAR', $numeroutente);
if (!($nomefileavatar))
{ $indirizzoavatar = '<img src="http:/www.xxx.xx/xxxx/modules/PNphpBB2/images/noavatar.gif">'; } /* This is to assign a standard image to people who don't upload their personalized avatar */
else { $indirizzoavatar = '<img src="http://www.xxx.xx/xxxx/images/avatar/' . $nomefileavatar . '">'; }
/* Mia modifica */
$template->assign_block_vars('memberrow', array(
'ROW_NUMBER' => $i + ( $start + 1 ),
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
/* Begin PNphpBB2 Module */
/* 'USERNAME' => $username, */
'USERNAME' => pnVarPrepForDisplay($username),
/* End PNphpBB2 Module */
'FROM' => $from,
'JOINED' => $joined,
'TERM_IMG' => $member_term_img,
'POSTS' => $posts,
'AVATAR_IMG' => $poster_avatar,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'AVATAR_ZIKULA' => $indirizzoavatar,
Template
file modules/PNphpBB2/templates/PNTheme/memberlist_body.tpl
From:
Code
<th>Â {L_PM}Â </th>
<th>Â {L_USERNAME}Â </th>
<th>Â {L_EMAIL}Â </th>
<th>{L_JOINED}</th>
<th>{L_POSTS}</th>
<th>{L_WEBSITE}</th>
<th>Avatar Forum</th>
</tr>
<!-- BEGIN memberrow -->
<tr>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.ROW_NUMBER}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.PM_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center"><a href="{memberrow.U_VIEWPROFILE}">{memberrow.USERNAME}</a></td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.EMAIL_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gensmall">{memberrow.JOINED}{memberrow.TERM_IMG}</span></td>
<td class="{memberrow.ROW_CLASS}" align="center">{memberrow.POSTS}</td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.WWW_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.AVATAR_IMG}Â </td>
</td>
</tr>
<!-- end membe rrow -->
<tr align="center">
<td class="cat" colspan="8">
to:
Code
<th>Â {L_PM}Â </th>
<th>Â {L_USERNAME}Â </th>
<th>Â {L_EMAIL}Â </th>
<th>{L_JOINED}</th>
<th>{L_POSTS}</th>
<th>{L_WEBSITE}</th>
<th>Avatar Forum</th>
<th>Avatar Zikula</th>
</tr>
<!-- BEGIN memberrow -->
<tr>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.ROW_NUMBER}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.PM_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center"><a href="{memberrow.U_VIEWPROFILE}">{memberrow.USERNAME}</a></td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.EMAIL_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gensmall">{memberrow.JOINED}{memberrow.TERM_IMG}</span></td>
<td class="{memberrow.ROW_CLASS}" align="center">{memberrow.POSTS}</td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.WWW_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.AVATAR_IMG}Â </td>
<td class="{memberrow.ROW_CLASS}" align="center">Â {memberrow.AVATAR_ZIKULA}Â </td>
</tr>
<!-- end membe rrow -->
<tr align="center">
<td class="cat" colspan="9">
It was so difficoult but in a week I wil made the whloe MOD to use only one profile shared between zikula and pnphpbb2
edited by: lordevol, Apr 24, 2009 - 06:16 PM
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
