1
etcetera
multiple avatars on newbb
  • 2009/7/7 21:52

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


XOOPS 2.3.3; newbb 3.08

My idea: I want to create new fields in the user profiles, in which users can insert links for multiple avatars, then allow users to select which avatar they will be posting with through a drop-down menu, checkbox, or whatever is easiest, on the post/reply form for newbb.

I would like to use [url=https://xoops.org/modules/newbb/viewtopic.php?start=10&topic_id=68575&viewmode=flat&order=ASC&type=&mode=0]this[url] to post the correct user field as an avatar on the forum.

I'm sure you guys are getting tired of my questions by now... but for the lucky few who have not run into one of them yet, I will reiterate: I know absolutely no PHP, so if anyone is bored and kind, it would be very much appreciated if you could write some code for me towards this. :)

I need:

1. The form for users to select which avatar (myfield1 - myfield8) they would like to use on this post (and where to put it).

2. An if command to find which avatar was selected for that particular post, and post it - use link above for posting a custom field on the forum.


I hope this is feasible; thank you so much!

2
etcetera
Re: multiple avatars on newbb
  • 2009/7/9 23:19

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


It just occurred to me that there's a whole new world of requirements to set an avatar for each post and not change your avatar on all of your other posts. Is this too hard to do?

3
ghia
Re: multiple avatars on newbb
  • 2009/7/10 16:06

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It means that you must store in the database with every post in the forum, which avatar was used.
Maybe you could abuse the message icon setting for that (see below the subject, when editing posts).

What is the function of this multiple avatar?
Normally the avatar supports the identity of the user.

4
etcetera
Re: multiple avatars on newbb
  • 2009/7/10 20:18

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


The purpose IS to distinguish the identity of the user. I was hoping for multiple avatars, because the forum I want them for is a roleplay. Each member plays up to 8 characters from one account. It would be very useful for distinguishing one character from another.

Using the message icon is a good idea, though. Is there a template for the reply form somewhere that I'm not seeing?

5
ghia
Re: multiple avatars on newbb
  • 2009/7/11 8:26

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Is there a template for the reply form somewhere that I'm not seeing?
I don't know what you are looking at.

6
etcetera
Re: multiple avatars on newbb
  • 2009/7/11 19:33

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


ok, rephrase: WHERE is the template for the reply form on newbb?

7
ghia
Re: multiple avatars on newbb
  • 2009/7/11 21:36

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


There is no template. It is a form and it is assembled by code in /modules/newbb/include/forumform.inc.php

8
etcetera
Re: multiple avatars on newbb
  • 2009/7/12 18:19

  • etcetera

  • Just popping in

  • Posts: 23

  • Since: 2009/6/13


a tiny bit of progress...


looking at this, in the file you just named:
Quote:

$icons_radio = new XoopsFormRadio(_MD_MESSAGEICON, 'icon', $icon);
$subject_icons = XoopsLists::getSubjectsList();
foreach ($subject_icons as $iconfile) {
$icons_radio->addOption($iconfile, '<img src="'.XOOPS_URL.'/images/subject/'.$iconfile.'" alt="" />');
}
$forum_form->addElement($icons_radio);


Is there a way to change this to:
if myfield1 is not null,
display myfield1
if myfield2 is not null,
display myfield2

etc. In which myfields are custom fields from the user profile?



Also, because <{$topic.topic_icon}> is written for the viewforum page, and I need it for the newbb_thread page, how/where would I need to alter code so that it would display as <{$topic_post.topic_icon}> instead?

Login

Who's Online

163 user(s) are online (125 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits