[beta] My MooD (install in 9 step)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
User avatar
Meis2M
Translator
Posts: 971
Joined: Wed Mar 03, 2010 11:32 am
Location: IR.Damghan
Name: میثم نوبری
Contact:

[beta] My MooD (install in 9 step)

Post by Meis2M »

Modification Name: [beta] My MooD (new way)

Author: Meis2M

Modification Description: my mood in new way

Styles:
subsilver2
prosilver

phpBB:
3.0.x - 3.1.dev

Modification Version: 1.0.0


Screenshots:
http://www.php-bb.ir/pic/images/6803087 ... 307934.png
http://www.php-bb.ir/pic/images/2017211 ... 180468.png
http://www.php-bb.ir/pic/images/3243795 ... 964861.png


Demo URL:
http://www.php-bb.ir/forum/articles-lea ... -t278.html

to see the images plz click on.

step 1:
go to acp and select USERS AND GROUPS tab
Image



step 2:
select Custom profile fields
Image



step 3:
follow the pic:
a) write mood in empty field
b) select Dropdow box
c) and select Create new field

Image



step 4:
follow the pic:
Image
point:
put your mood in the Entries field like the pic.
http://www.php-bb.ir/mod/mood.txt



step 5:
follow the pic.
Image
choose None specified in Default value.



step 6:
follow the pic:
Image
save your change.



step 7:
now you must put your mood pic in your forum root.
download the .zip pack:
http://php-bb.ir/mod/mood.zip

and upload mood file in your address :
http://www.example.com/forum/images/

it means all the mood pic must be here:
http://www.example.com/forum/images/mood/



step 8:
now open:
/styles/prosilver/template/memberlist_view.html

find:

Code: Select all

<!-- END custom_fields -->
add after:

Code: Select all

  <!-- IF S_PROFILE_MOOD --> 
    <dt> 
    <strong>my mood:</strong>  
    <dd><img src="./images/mood/{PROFILE_MOOD_VALUE}.gif" alt="{PROFILE_MOOD_VALUE}" /></b></dd> 
    </dt> 
    <!-- ENDIF -->
open:
styles/(prosilver or subsilver2)/template/viewtopic_body.html

find:

Code: Select all

<!-- END custom_fields -->
add after:

Code: Select all

<!-- IF postrow.S_PROFILE_MOOD --><b>my mood:</b><img src="./images/mood/{postrow.PROFILE_MOOD_VALUE}.gif" alt="{postrow.PROFILE_MOOD_VALUE}" /></b><!-- ENDIF --> </br>
open:
styles/subsilver2/template/memberlist_view.html

find:

Code: Select all

<!-- END custom_fields -->
add after:

Code: Select all

    <!-- IF S_PROFILE_MOOD --> 
    <tr> 
    <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><strong>my mood:</strong> </td> 
    <td><img src="./images/mood/{PROFILE_MOOD_VALUE}.gif" alt="{PROFILE_MOOD_VALUE}" /></b></td> 
    </tr> 
    <!-- ENDIF -->


step 9:
clear the cache from ACP and end :D




important point:
if you want to add a new mood you must add your mood text in step 4 and add your mood pic in step 7
and listen to me:
your text mood and your pic mood must be a same name.


good luck meysam.
phpBB persian international support
Follow us in Instagram
Free upgrade and install extensions on your forum - drop me PM
Ultimate phpBB SEO Friendly URL extension
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: [beta] My MooD (install in 9 step)

Post by ViolaF »

Thanks, that way is my own favorite way.
A question: Where is S_PROFILE_MOOD defined?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52627
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [beta] My MooD (install in 9 step)

Post by Brf »

ViolaF wrote: Where is S_PROFILE_MOOD defined?
All custom profile fields have template variables defined this way. It is nothing new.
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: [beta] My MooD (install in 9 step)

Post by ViolaF »

So its automatically generated. Thanks..
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17560
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [beta] My MooD (install in 9 step)

Post by DavidIQ »

This isn't really a MOD. Please submit to the Knowledgebase as an example of how to extent Custom Profile Fields to include images.

Thanks.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
Locked

Return to “[3.0.x] MODs in Development”