[BETA] Extra User Information mod

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

[BETA] Extra User Information mod

Post by niwotata »

2004/08/02 update:
Hi, I will not release any new version of this mod, because: 1, I have edited phpbb in a way that it's very difficult for me to seperate this mod out from my other codes, 2, there is a fundamental flaw in the mod that related to foreign language(single language board has no such problem), this mod will never make it to the mod database because of this flaw (it completely violated mod coding standard).
I will continue support for those who'v already useded the mod.


7/16/2004 small fix. see:http://www.phpbb.com/phpBB/viewtopic.ph ... 67#1158767

Update: new version
Please note the download is snw mod, but there is a xui_install.txt describing just xui mod install.

Code: Select all

##   2004/07/15 - Version 0.2
##  - add radio button type
##  - greatly enhanced friends_search, can search individual field and logically AND search creteria
##  - link to similar people (use friends_search) in profile view

Code: Select all

##   2004/07/07 -Version 0.1
##  - add XUI features to ACP admin_users.php
##  - add check box for multiple selection
##  - deleted readme.txt and friends_search.php from the package
##  - some bug fixes
download updated
------------------------------------------------------

Original message below
hi,
I developed a extra user information mod.

xui (eXtra User Information) mod
Main features:
- admin can add, delete, edit types of extra user information, you can add as many fields as you want
- no change to the phpbb_users database table
- display extra user information on the profile view page
- users enter extra information when registering or editing their own profiles, users can choose not to enter any information in text and numeric type, but will be forced to select an option if it's selection type, but still, admin can create an empty option for user to select.
- user can search other users based on extra user information

Please give it a try, and let me know any bugs and how I should improve it, thanks.

I am also writing a friendster like social networking mod to work with this xui mod.

I have no demo board at this time.

6/20/04
temp bug fix:
in includes/usercp_register.php

Code: Select all

					$sql = "INSERT INTO " . XUINFO_TABLE . " (user_id, type_id, info) VALUES" . $sqlinsert;
change it to:

Code: Select all

					$sql = "REPLACE INTO " . XUINFO_TABLE . " (user_id, type_id, info) VALUES" . $sqlinsert;
The bug show up when someone register after admin delete a user. This is a temperory fix. In the next rev. it will be fixed complete and clean.

download updated
Last edited by niwotata on Mon Aug 02, 2004 8:03 am, edited 5 times in total.

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

I created some screenshots

Post by niwotata »

some screenshots to help you evaluate.

http://www.pantovision.com/download/demo.htm
total size is over 1M, so it will probably take some time to load.

User avatar
Rookie7
Registered User
Posts: 189
Joined: Mon Mar 10, 2003 3:32 pm
Contact:

Post by Rookie7 »

That's pretty awesome.

Any chance you can make the fields show up on viewtopic also?

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

Looks fine : great job :)
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Post by beggers »

This looks great. One question: your comments in the installation text say that this feature is part of "social networking" mod. Will this mod become part of the snw mod? Please explain that to us. Thanks.

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

Post by niwotata »

Thanks, Rookie7 and morpheus2matrix.
Rookie7: it won't look good putting those info on viewtopic. If a user has quite a few info, but just one or 2 lines of post, there will be lots of empty space in the post area. I don't plan to add it, those info is only one click away anyway.
beggers wrote: This looks great. One question: your comments in the installation text say that this feature is part of "social networking" mod. Will this mod become part of the snw mod? Please explain that to us. Thanks.

Thanks. This WAS, and still is, part of snw mod, I seperate it out because I thought people might use it by itself as a mod. I will release snw mod as a beta in the next week or two.

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

sorry for error

Post by niwotata »

There was an error in install text. the "copy" section should be:

Code: Select all

#
#-----[ COPY ]------------------------------------------------
#
copy admin/admin_xuitype.php admin/admin_xuitype.php
copy templates/subSilver/admin/xuitype_admin_edit_body.tpl templates/subSilver/admin/xuitype_admin_edit_body.tpl
copy templates/subSilver/admin/xuitype_admin_body.tpl templates/subSilver/admin/xuitype_admin_body.tpl
copy friends_search.php to friends_search.php
copy templates/subSilver/friends_search_body.tpl to templates/subSilver/friends_search_body.tpl
Edward, thank you for pointing this out

Also in usercp_register.php please find 2 occurences:

Code: Select all

$tmpxui = stripslashes($HTTP_POST_VARS[$tmpxuiid]);
and change it to

Code: Select all

$tmpxui = str_replace("\'", "''", $HTTP_POST_VARS[$tmpxuiid]);
this fix single quote ['] in text info problem.

The download has been fixed. Sorry for those who already downloaded.
Last edited by niwotata on Wed Jun 16, 2004 7:14 pm, edited 1 time in total.

LegendKnight
Registered User
Posts: 94
Joined: Sun Jun 15, 2003 3:49 am
Location: Tarn-Vedra
Contact:

Post by LegendKnight »

Spectacular!
Great job niwotata!
I was looking for something like this. I’ll give it a try. :D

-LK
Image

angelharp
Registered User
Posts: 5
Joined: Wed Jun 16, 2004 10:11 pm
Location: Lompoc, CA
Contact:

Cannot modify header information

Post by angelharp »

This mod is exactly what I'm looking for. However, I cannot get it to work. :( I'm sure I followed the instructions exactly as specified in the install file. I'm getting the following errors:

1. Top of the home page, I see this:
Warning: Cannot modify header information - headers already sent by (output started at /home/aabundez/public_html/delcocrew/forum/includes/constants.php:189) in /home/aabundez/public_html/delcocrew/forum/includes/sessions.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /home/aabundez/public_html/delcocrew/forum/includes/constants.php:189) in /home/aabundez/public_html/delcocrew/forum/includes/sessions.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /home/aabundez/public_html/delcocrew/forum/includes/constants.php:189) in /home/aabundez/public_html/delcocrew/forum/includes/page_header.php on line 474

Warning: Cannot modify header information - headers already sent by (output started at /home/aabundez/public_html/delcocrew/forum/includes/constants.php:189) in /home/aabundez/public_html/delcocrew/forum/includes/page_header.php on line 476

Warning: Cannot modify header information - headers already sent by (output started at /home/aabundez/public_html/delcocrew/forum/includes/constants.php:189) in /home/aabundez/public_html/delcocrew/forum/includes/page_header.php on line 477


2. When I click on a member's name on the memberlist, I see the following error:
Parse error: parse error, unexpected $ in /home/aabundez/public_html/delcocrew/forum/includes/template.php(127) : eval()'d code on line 107


3. When I try to login, I just get a white background screen with the error messages in #1.

I've incorporated the changes you specified on this thread and I'm working with phpBB version 2.0.8.

Any idea what's wrong?

Thanks,

Angel

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

Post by niwotata »

Gee, I have no idea.

Constants.php line 189? On a fresh board with my mod installed, constats.php should have total 185 lines.
You must have some other mods installed. Can you tell me what else you installed?

It might be something trivial like comment misplaced. Take a second look?

Let me know

angelharp
Registered User
Posts: 5
Joined: Wed Jun 16, 2004 10:11 pm
Location: Lompoc, CA
Contact:

Solved header error but still get error in profile.php

Post by angelharp »

Your reply made me go back to delete the extra carriage returns I had after the "?>" at the end of constants.php. After I deleted these extra spaces, IT WORKED! Now I can login! 8O
Who would have thought that extra spaces cause PHP problems?

Anyways, I'm still getting the parsing error when I try to access a member's profile. Any ideas?

Here's the code between lines 107 and 129 in template.php:

Code: Select all

	/**
	 * Load the file for the handle, compile the file,
	 * and run the compiled code. This will print out
	 * the results of executing the template.
	 */
	function pparse($handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->pparse(): Couldn't load template file for handle $handle");
		}

		// actually compile the template now.
		if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
		{
			// Actually compile the code now.
			$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
		}

		// Run the compiled code.
		eval($this->compiled_code[$handle]);
		return true;
	}
Thanks again!

Angel

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

Post by niwotata »

Hi, Angel, The code you posted is standard phpbb template.php, which should not have any problem.

The problem should be profile_view_body.tpl. usually when what you described happens, it is cause by bad BEGIN END blocks.
When inserted my mod, you might have accidentally messed up some <!-- BEGIN ??><!-- END ??> blocks(maybe from other mods).

Please check carefully BEGIN END match in that file.
Let me know how it goes.

angelharp
Registered User
Posts: 5
Joined: Wed Jun 16, 2004 10:11 pm
Location: Lompoc, CA
Contact:

Profile viewing ok, but still cannot edit profile

Post by angelharp »

Thanks niwotata!

You were right. I actually inserted an additional <!-- BEGIN --> before the "<tr>... " because I thought you may have missed that. I deleted it and now I can view the profiles just fine. Thanks! :)

I have to stop trying to second guess what people are thinking. :oops:

However, onto the next problem. When I try to edit my profile, I get the following parse error:
Parse error: parse error, unexpected $ in /home/aabundez/public_html/delcocrew/forum/includes/template.php(127) : eval()'d code on line 308


Very similar to the one before, but different line number. I can't figure it out.

Thanks for your help thus far niwotata.
Angel

angelharp
Registered User
Posts: 5
Joined: Wed Jun 16, 2004 10:11 pm
Location: Lompoc, CA
Contact:

Addition to prior reply

Post by angelharp »

I should also mention that I get the same parse error when I try to register a new user.

-Angel

User avatar
niwotata
Registered User
Posts: 20
Joined: Wed May 26, 2004 4:27 pm
Location: Texas
Contact:

Post by niwotata »

Angel,
you sure you didn't make the same guess on profile_add_body.tpl? :D

Check that file too for unmatched <!-- BEGIN..><!-- END ..>.

Post Reply

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