Firefox PHP

Module: "User Avatar Quotes"

Posted by Anonymous User 
Anonymous User
Module: "User Avatar Quotes"
July 18, 2009 03:27PM
Allows administrator to customize the configuration of the smiley BBcode box (order of smileys in the box).



Still in development. New suggestions welcome.

Here my first elements:

-To incorporate into the settings.php of the Smileys module:

Language: PHP
// ACTION: Change the display order of the items in the list. if (isset($_GET[';display_up';]) || isset($_GET[';display_down';])){ if (isset($_GET[';display_up';])) { $smiley_id = (int)$_GET[';display_up';]; $movement = ';up';; } else { $smiley_id = (int)$_GET[';display_down';]; $movement = ';down';; }   phorum_mod_smileys_change_order($smiley_id, $movement, 1);

But then... what ?



Edited 1 time(s). Last edit at 07/19/2009 03:26PM by ab1.
Re: Module: Enhanced Smileys Tool Box
July 18, 2009 07:14PM
First of all: the Modules forum is for posting finished modules. What you have done so far, can hardly be called a start for a module. Therefore, please keep it out of the modules forum. Thank you.

To answer your question "But then... what ?": then you start coding.
I am not sure how good you are at coding, but what you now are asking for is to write the change for you really, since there's not really any significant work done.

That change order function seems to be a bit of a rip off of the Forums API call phorum_api_forums_change_order(). If you want to have a similar function for the smileys, you will have to implement that function.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Anonymous User
Re: Module: Enhanced Smileys Tool Box
July 18, 2009 08:43PM
Well, i'm not a fanatic of coding, but i try to see what i can do with phorum features. I would wish to associate several modules for further developments, but it needs some kind of advanced interoperability.

My idea is to transform avatars into kind of smileys that appear when one quotes a message inside the quotation box. The avatars will be transformed into smileys formats, then will be sent into a special database (separate from the one of traditional smileys) which would be used by the quotation module according to the author of the message.

I guess one first step is to make a clone of the smiley module and to change the name "smiley" everywhere into another name for the avatars. How to transform uploaded avatars into appropriate format (width, height and extension) would be the work of another sub-module.
Re: Module: Enhanced Smileys Tool Box
July 19, 2009 11:53AM
That all sounds rather hacky to me.
What you want to do, is write a module that:

  • overrides the behavior of the "Quote" handling (hook: "quote", also used by the BBcode module) to apply some kind of quote tag that looks like "
    Quote
    id="<user_id>" name="<user name>"
    .....
    ".
  • overrides the behavior of rendering the quote block (hook: "bbcode_register"), to translate the "id" parameter into the avatar to show and to render the final HTML code for the quote block.

That would be the correct path IMO. The what you are trying now is to hack it in, but I don't really see where this idea would be leading to. I doubt that it would work in the end. Using the design that I described above, it should be fairly easy to write a module that does handle this.

It could be implemented as a part of the User Avatar module, but it is also possible to put this in a separate module (I'd even prefer that) that could be named something like "User Avatar Quotes".


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Anonymous User
Re: Module: Enhanced Smileys Tool Box
July 19, 2009 03:23PM
Quite, but bearing in mind that to render the final HTML code for the quote block supposes to allow HTML into the posting area.

That's why i was speaking of emoticons (smileys) like.



Edited 1 time(s). Last edit at 07/19/2009 03:25PM by ab1.
Re: Module: Enhanced Smileys Tool Box
July 19, 2009 07:47PM
Of course you should not allow HTML in the body of a message.
We don't allow it in the standard bbcode [quote] tag, do we?
So find out what that one is doing. You'll have to take care of escaping the part that the user can input.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Anonymous User
Re: Module: Enhanced Smileys Tool Box
July 22, 2009 02:09PM
Well, for the moment, this feature is not of first importance. I take a pause with it: i'm currently working on the RSS feed architecture.
Re: Module: Enhanced Smileys Tool Box
August 10, 2009 01:09AM
Ab1: [www.phorum.org]

-------------------------------------------

"Everything we see or seem, is but a dream within a dream." -Edgar Allan Poe
Sorry, only registered users may post in this forum.

Click here to login