myfreeforum.org Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Who is OnlineWho is Online   Join! (free) Join! (free)  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
For an excellent guide to using your myfreeforum forum, you can visit
howtodoit
The howtodoit "readonly" forum provides answers and walkthroughs for all common questions.
  • Welcome
  • Country: US
    US
    Address: 38.107.191.118
  • Server Appeal

phpBB3: New userinfo/welcome portal
Page 1, 2  Next
 
Post new topic   Reply to topic    myfreeforum.org Forum Index -> What's new? Announcements!
View previous topic :: View next topic  
Author Message
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 17, 2009 9:26 am    Post subject: phpBB3: New userinfo/welcome portal Reply with quote

Much like the phpbb2 USERINFO portal, this portal gives access to AVATAR/RANK/IP and some other profile details. It also links the user to the country code database identifying where they are form via a profile field you can set up.


-----------
(phpbb3 only)

To add the country flag profile, create a Single Text Field profile field called "Country", leave everything default.

Open viewtopic_body.html, and add this where you want the flag to show (see http://howtodoit.myfabforum.org for more defails):
Code:
<!-- BEGIN custom_fields -->
               <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Country" -->
<img src="./ranks/ccflags_medium/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png" /><br />
               <!-- ENDIF -->

               <!-- END custom_fields -->


This will show now show the flag on the side when viewing a topic.



_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 6:39 pm    Post subject: Reply with quote

How can we set up the profile field?

We can't just do the xprofile field like phpbb2... so how would we do it?
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 6:42 pm    Post subject: Reply with quote

Just set up a new phpbb3 profile field.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 6:47 pm    Post subject: Reply with quote

Does it matter which kind? Since phpbb3 requires you to select boolean, single text, text field, numbers, dropdown box, and date.

I've tried it with the single text and text field, but nothing came up.
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 6:53 pm    Post subject: Reply with quote

text is good, but there is good reason nothing happened I expect.

to save load your flag is a cookie, only when the cookie is not there (or showing an invalid value in which case a retry occurs randomly) does the flag get found again, and only then does the profile field get set.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 7:30 pm    Post subject: Reply with quote

Well, after some playing I got it up, for some reason the profile field didn't want to show up... removed and readded with copy/paste a few times and it worked... oddly.

Anyway, the cookie is set and read properly.. but there's one problem: The info it puts into the profile field is just the code.  Mine now shows US, nothing more.

perhaps it needs something to change that code into the flag?  Maybe editing the code something like:

Note: Random rough draft just for an idea...

Code:
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Country" -->
<img src="./flag_code/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png"><br />
               <!-- ENDIF -->


Would that be the easiest way to do it, since then it would just replace it to use the country code in the image tag?
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 7:36 pm    Post subject: Reply with quote

That does seem to be the way to do things in phpbb3 phpbb3 profile fields really are terminally useless compared to what we did with xprofile fields in phpbb2.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 7:38 pm    Post subject: Reply with quote

Would it be useful to create that as a portal, then just instruct people to create the single text area profile field "country"?

That would make things much easier for everybody that wants it, I think.

Then again, a quick guide into the phpbb3 howtodoit would be just as easy.
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 7:50 pm    Post subject: Reply with quote

Just played with it, and might need it as a portal.

The problem is that using the code..

Code:
               <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Country" -->
<img src="./images/ranks/ccflags_medium/{postrow.custom_fields.PROFILE_FIELD_VALUE}.png" /><br />
               <!-- ENDIF -->


works great, besides one small problem... the country codes are stored in upper case, but the flags are stored as lowercase.  So it's looking for say US.png when only us.png exists.

Any ideas that don't involve javascript?
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 7:55 pm    Post subject: Reply with quote

flags should be stored in lowercase   they are now.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 8:05 pm    Post subject: Reply with quote

Works, but I noticed one thing, don't think it's really relevant though.

If the cookie is already set, it isn't resetting it, and if the cookie is deleted then this error pops up on the userinfo portal

Code:
[phpBB Debug] PHP Notice: in file /myffcms/com_userinfo.php on line 82: Cannot modify header information - headers already sent by (output started at /includes/template.php:831)


It only pops up once until the cookie is set again.  Noticed it because I had to delete the cookie to get it to set it as lowercase.
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 8:32 pm    Post subject: Reply with quote

not resetting the cookie is not a bug.

Where have you put the portal?
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 8:48 pm    Post subject: Reply with quote

the index portal page.  I don't have it on the full forum.

http://harsh-reality.net/index.php?component=indexpage
_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
admin (no pm's please)
Site Admin
Site Admin


Virtual Cash: 22860

Joined: 22 May 2005
Posts: 25384



Add Karma

rated by 213 members
Add Comment
Show Comments

online/offline
PostPosted: Thu Jun 18, 2009 8:53 pm    Post subject: Reply with quote

I have put a fix in, but what you say does explain the notice a bit. Hopefully it should be alright now anyway.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

Back to top
View user's profile Private message Visit poster's website
Zudane
Moderator
Moderator


Virtual Cash: 14250

Joined: 10 May 2008
Posts: 1366



Add Karma

rated by 18 members
Add Comment
Show Comments

online/offline
PostPosted: Fri Jun 19, 2009 5:06 am    Post subject: Reply with quote

a member pointed this out, I hadn't noticed...




That looks like it says unkhown.  I'm not certain if it does or not, but that n sure looks like an h.


on a similar note...



is tiny... the smaller version is nigh more than a blue dot.



_________________


Harsh Reality - Unleash your creativity!

Harsh Reality
Back to top
View user's profile Private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    myfreeforum.org Forum Index -> What's new? Announcements! All times are GMT
Page 1, 2  Next
Page 1 of 2
 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum