1 (edited by nickfzx 2006-09-02 03:17)

Topic: a new button below avatar

So I have a punbb installation with coppermine integrated

go check it out if you like http://www.amateurillustrator.com/


I would like to add a custom link underneath everyones avatars that is called "see all this users uploaded images" or something along those lines.

So basically what it does is take the userid of the person who's post it is and ads it to the end of this url:

www.amateurillustrator.com/galleries/thumbnails.php?album=lastupby&uid= (then the user id)

the coppermine and punbb user id's are the same so it should work fine...just wandering how would I go about realising this?

How do I put a link under the avatar?

How do I get hold of the user id of the users whos post it is and then stick it on the end of that link....so each link under each avatar has a different userID at the end.

Would I have to add an extra line to the database or is it easir than that?

Help would be awsome smile

All the best

Nick

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: a new button below avatar

You'll want to edit this block of code in viewtopic.php:

                // We only show location, register date, post count and the contact links if "Show user info" is enabled
                if ($pun_config['o_show_user_info'] == '1')
                {
                        if ($cur_post['location'] != '')
                        {
                                if ($pun_config['o_censoring'] == '1')
                                        $cur_post['location'] = censor_words($cur_post['location']);

                                $user_info[] = '<dd>'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']);
                        }

                        $user_info[] = '<dd>'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']);

                        if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
                                $user_info[] = '<dd>'.$lang_common['Posts'].': '.$cur_post['num_posts'];

                        // Now let's deal with the contact links (E-mail and URL)
                        if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
                                $user_contacts[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
                        else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
                                $user_contacts[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';

                        if ($cur_post['url'] != '')
                                $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
                }

Simply add the other link to the $user_contacts array. Use $cur_post['poster_id'] to get the user id.

Looking for a certain modification for your forum? Please take a look here before posting.

3 (edited by bfdhud 2006-09-02 05:12)

Re: a new button below avatar

lol, This is awesome, I was looking for something exactly like this. Thanks Pogen for answering and nick for asking

Re: a new button below avatar

cool

I'll try this out later...I'll post once I've got it working

cheers

Nick

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: a new button below avatar

thanks a lot for the help...that was suprisingly easy to do smile

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community