[BETA] Ultimate Board Clubs 1.0.3

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!
Ideas Centre
Locked
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by Jessica »

oh I thought it was an old version when you sent me that PM woipi...because it was 1.0.0 and I was confused because I was using 1.0.2...but now it's clear. I'm going to uninstall the old one on my test forum and install this one
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

Jessica wrote:oh I thought it was an old version when you sent me that PM woipi...because it was 1.0.0 and I was confused because I was using 1.0.2...but now it's clear. I'm going to uninstall the old one on my test forum and install this one
yeah thats why i called it ultimate board clubs now so that there is no confusion... :lol:


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by Jessica »

right (: I'm loving it so far (looked at the demo). much better than before
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

Jessica wrote:right (: I'm loving it so far (looked at the demo). much better than before
ye with the next version the new style will come but there will be no major changes... you will just have to reupload the stylepackage... ;)


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by Jessica »

think I found a bug...
if you set 'Clubs per user' to 0, you won't be able to create a club, even though 0 = unlimited. You get a message that you've already created 0 clubs and creating another one will 'go against the 0-club rule' or whatever :S
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

reuploaded package... should be fixed now.. ;)

thx for the report!
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by Jessica »

I already installed it on my test forum; what file(s) do I need to upload to fix it? or do I have to reinstall it?

also, a suggestion

the test category description is:

"this is a test category which you c..."

I don't really like the fact that part of it is cut off (and you can't read more until you go into the category), so I have a suggestion to add a link named "More" (or something) and when you click on it, the rest of the description is shown to you. So if there's a category with a really long description, part of it is on the main page and someone can click on "More" to read more of it. get what I mean?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

Jessica wrote:I already installed it on my test forum; what file(s) do I need to upload to fix it? or do I have to reinstall it?

also, a suggestion

the test category description is:

"this is a test category which you c..."

I don't really like the fact that part of it is cut off (and you can't read more until you go into the category), so I have a suggestion to add a link named "More" (or something) and when you click on it, the rest of the description is shown to you. So if there's a category with a really long description, part of it is on the main page and someone can click on "More" to read more of it. get what I mean?
ye u only have to reupload the clubs.php...

ill think about this for the next release..


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
vipaka
Registered User
Posts: 492
Joined: Sun Aug 28, 2011 7:25 pm
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by vipaka »

I'll be installing and testing this mod shortly. :)

Edit: this is a 15 min install(min), not 5...it took me 20.

Missing features/glitches:

*Posts inside the clubs do not grant any associated point-values from the ultimate points mod to the user who is posting. Source of error in that the sql tables for the clubs do not have a value for "points_per_post"/edit etc for each category/topic like main forums do. I have a theory this can be rememdied with the default category post_points code though...

*Thread posts inside the club's message board have topics assigned to every reply, even though they shouldn't...seems to be an array issue

*The "create a message board" bit in the upper left of the clubs main page seems to be cut off a smidge...*Fixed by adding an icon/button instead of text into the html.

*Also despite having the ACP controls for "enable founder delete" set to enabled, I don't see anything anywhere to allow founders to do this.

*Clicking on club feeds logs me out, possibly because I have feeds disabled on my board...

Is the new search engine included on the clubs page SQL injection safe, and the memberlist search and avatar upload?

Anyways most of these issues should be easily resolved. I'll see if I can fix some of them, and if so, post the scripts I used to do so.


Edit: Added this code

Code: Select all

	$cat_id = request_var('catid', 0);
			$cat_data = $bc->get_cat_data($cat_id);
before

Code: Select all

$template->assign_block_vars('navlinks', array(
				'U_VIEW_FORUM'  	=> append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=info&cid=' . $cid),
				'FORUM_NAME'    	=> $cat_data['club_name'],

			));
			if ($submode != 'create')
			{
				$template->assign_block_vars('navlinks', array(
					'U_VIEW_FORUM'  	=> append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=cat&submode=view&cid=' . $cid . '&catid=' . $cid),
					'FORUM_NAME'    	=> $cat_data['cat_name']
				));
}
in clubs.php to eliminate a few errors I was getting from messing with url. Don't want the user's seeing that SQL info...
Last edited by vipaka on Thu Jan 05, 2012 5:07 pm, edited 4 times in total.
Curious about my work? See it for yourself.
Image
User avatar
helloclan13
Registered User
Posts: 99
Joined: Tue Feb 08, 2011 3:18 pm
Location: Born on Tauri, currently living on P3X-289

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by helloclan13 »

This mod is really great- big toast to everyone that helped :) .
But just go a bit easy on the indenting, took me like half an hour to get it writable.
-Maybe we could chunk it down a bit for the next version?
Last edited by helloclan13 on Fri Apr 06, 2012 4:29 am, edited 1 time in total.
I came here to chew bubblegum and write code, and im all out of bubblegum.
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

vipaka wrote:I'll be installing and testing this mod shortly. :)

Edit: this is a 15 min install(min), not 5...it took me 20.
ok changed this... ;)
vipaka wrote: Missing features/glitches:

*Posts inside the clubs do not grant any associated point-values from the ultimate points mod to the user who is posting. Source of error in that the sql tables for the clubs do not have a value for "points_per_post"/edit etc for each category/topic like main forums do. I have a theory this can be rememdied with the default category post_points code though...
ye the integration is very simple... its only for creating and joining... ;)
vipaka wrote: *Thread posts inside the club's message board have topics assigned to every reply, even though they shouldn't...seems to be an array issue
i dont know what u mean...
vipaka wrote: *The "create a message board" bit in the upper left of the clubs main page seems to be cut off a smidge...*Fixed by adding an icon/button instead of text into the html.
hm there is already an icon there?!
vipaka wrote: *Also despite having the ACP controls for "enable founder delete" set to enabled, I don't see anything anywhere to allow founders to do this.
hm this option is included, u can do this through cap..
vipaka wrote: *Clicking on club feeds logs me out, possibly because I have feeds disabled on my board...
thx thats fixed in new package... redownload and redo the edits in jumpbox.html!
vipaka wrote: Is the new search engine included on the clubs page SQL injection safe, and the memberlist search and avatar upload?
no i didnt change anything in the clubsearchsystem through i dont know what to change.. i hope somebody could create some new search system...
vipaka wrote: Anyways most of these issues should be easily resolved. I'll see if I can fix some of them, and if so, post the scripts I used to do so.


Edit: Added this code

Code: Select all

	$cat_id = request_var('catid', 0);
			$cat_data = $bc->get_cat_data($cat_id);
before

Code: Select all

$template->assign_block_vars('navlinks', array(
				'U_VIEW_FORUM'  	=> append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=info&cid=' . $cid),
				'FORUM_NAME'    	=> $cat_data['club_name'],

			));
			if ($submode != 'create')
			{
				$template->assign_block_vars('navlinks', array(
					'U_VIEW_FORUM'  	=> append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=cat&submode=view&cid=' . $cid . '&catid=' . $cid),
					'FORUM_NAME'    	=> $cat_data['cat_name']
				));
}
in clubs.php to eliminate a few errors I was getting from messing with url. Don't want the user's seeing that SQL info...
thx did change that...
helloclan13 wrote:This mod is really great- big toast to everyone that helped :) .
But just go a bit easy on the procrastination, took me like half an hour to get it writable.
-Maybe we could chunk it down a bit for the next version?
plz describe what u mean by that... less ediets in files?


thx for your replies!!


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
cdodds
Registered User
Posts: 228
Joined: Sat Jul 10, 2010 2:19 am
Name: Don Cdoddsy
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by cdodds »

woipi90 wrote:
vipaka wrote: Is the new search engine included on the clubs page SQL injection safe, and the memberlist search and avatar upload?
no i didnt change anything in the clubsearchsystem through i dont know what to change.. i hope somebody could create some new search system...
Just run the integer values through intval and string values through mysql_real_escape_string. Do that before you send the queary to the database. That should prevent any SQL injection.
vipaka
Registered User
Posts: 492
Joined: Sun Aug 28, 2011 7:25 pm
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by vipaka »

cdodds wrote:
woipi90 wrote:
vipaka wrote: Is the new search engine included on the clubs page SQL injection safe, and the memberlist search and avatar upload?
no i didnt change anything in the clubsearchsystem through i dont know what to change.. i hope somebody could create some new search system...
Just run the integer values through intval and string values through mysql_real_escape_string. Do that before you send the queary to the database. That should prevent any SQL injection.
That, and make sure any SQL user-inquiries are using double quotes (") not single quotes (').
Curious about my work? See it for yourself.
Image
vipaka
Registered User
Posts: 492
Joined: Sun Aug 28, 2011 7:25 pm
Contact:

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by vipaka »

The thread title issue is as such. When you post a reply in the forums, every post has a message and a title section, for which the thread title is automatically generated into the title of the reply. In clubs, the title for each reply is left blank instead of showing the thread title, but does appear after the message has been posted.

The acp controls for deleting a club by the founder don't do anything. There is no button or submit form anywhere for founders to click/submit if they want to delete their club, even when "founder delete" is enabled in the ACP. The only way I can see to delete a club is for the admin to go in and remove it from the club list in the ACP...which founders for the club can't access. When manually plugging in the url address for deleting a club(clubs.php?mode_clubs=del_club&cid=$cid), this error appears "You are not permitted to perform this action. You will now be redirected to the clubs info page," even when you are on the admin account, AND the founder of the club.

The icon for creating a board is missing in the DL, when I installed it had a language variable (Create A Message Board)/CAT_CREATION showing up where the icon should have.

So far what I've got for the points mod is listed below. Looking for parameters now to see if I can limit the SQL updating to only if points is enabled.

EDIT: Here is what I've got so far. This will give/subtract points for a new topic, reply post or edited post with the same amount as assigned in the ACP ultimate points mods for the forums. Will not grant points if new topic/reply post/edit is not submitted. However there is a glitch that if you click the back button after submitting it will re-grant the points, I'll work on correcting this.
clubs.php
find

Code: Select all

if ($bc->is_valid('file_up'))
							{
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->create_post($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=cat&submode=view&cid=' . $cid . '&catid=' . $cat_id);
add after

Code: Select all

$sql = "SELECT forum_topic
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_topic";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$topic_points = (float) $row['forum_topic'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $topic_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
find

Code: Select all

}
							if ($bc->is_valid('file_up'))
							{
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->create_reply($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=post&submode=view&pid=' . $pid);
add after

Code: Select all

$sql = "SELECT forum_post
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_post";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$post_points = (float) $row['forum_post'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $post_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);

find

Code: Select all

{
									unlink($phpbb_root_path . $info['file_up']);
								}
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->edit_post($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=post&submode=view&pid=' . $original_post['post_id']);

add after

Code: Select all

$sql = "SELECT forum_edit
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_edit";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$edit_points = (float) $row['forum_edit'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $edit_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
Curious about my work? See it for yourself.
Image
User avatar
woipi90
Registered User
Posts: 908
Joined: Mon Feb 16, 2009 5:32 pm
Location: Austria

Re: [BETA] Ultimate Board Clubs 1.0.0

Post by woipi90 »

vipaka wrote:
cdodds wrote:
woipi90 wrote:
vipaka wrote: Is the new search engine included on the clubs page SQL injection safe, and the memberlist search and avatar upload?
no i didnt change anything in the clubsearchsystem through i dont know what to change.. i hope somebody could create some new search system...
Just run the integer values through intval and string values through mysql_real_escape_string. Do that before you send the queary to the database. That should prevent any SQL injection.
That, and make sure any SQL user-inquiries are using double quotes (") not single quotes (').
sry i have to ask but have you seen some file where its handeled different?
vipaka wrote:The thread title issue is as such. When you post a reply in the forums, every post has a message and a title section, for which the thread title is automatically generated into the title of the reply. In clubs, the title for each reply is left blank instead of showing the thread title, but does appear after the message has been posted.
reuploaded the package... maybe thats what u are meaning..
vipaka wrote: The acp controls for deleting a club by the founder don't do anything. There is no button or submit form anywhere for founders to click/submit if they want to delete their club, even when "founder delete" is enabled in the ACP. The only way I can see to delete a club is for the admin to go in and remove it from the club list in the ACP...which founders for the club can't access. When manually plugging in the url address for deleting a club(clubs.php?mode_clubs=del_club&cid=$cid), this error appears "You are not permitted to perform this action. You will now be redirected to the clubs info page," even when you are on the admin account, AND the founder of the club.
hm dont know why it shouldnt work?! cause its working fine on my board!
u have to enable this option through acp.. then go to your cap and u have to check the checkbox that u wanna delete the club and then submit!
vipaka wrote: The icon for creating a board is missing in the DL, when I installed it had a language variable (Create A Message Board)/CAT_CREATION showing up where the icon should have.
no the icon is just in there.. hm it functioned all the time... dont know why it isnt functioning anymore! has somebody an idea?
vipaka wrote: So far what I've got for the points mod is listed below. Looking for parameters now to see if I can limit the SQL updating to only if points is enabled.

EDIT: Here is what I've got so far. This will give/subtract points for a new topic, reply post or edited post with the same amount as assigned in the ACP ultimate points mods for the forums. Will not grant points if new topic/reply post/edit is not submitted. However there is a glitch that if you click the back button after submitting it will re-grant the points, I'll work on correcting this.
clubs.php
find

Code: Select all

if ($bc->is_valid('file_up'))
							{
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->create_post($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=cat&submode=view&cid=' . $cid . '&catid=' . $cat_id);
add after

Code: Select all

$sql = "SELECT forum_topic
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_topic";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$topic_points = (float) $row['forum_topic'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $topic_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
find

Code: Select all

}
							if ($bc->is_valid('file_up'))
							{
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->create_reply($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=post&submode=view&pid=' . $pid);
add after

Code: Select all

$sql = "SELECT forum_post
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_post";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$post_points = (float) $row['forum_post'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $post_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);

find

Code: Select all

{
									unlink($phpbb_root_path . $info['file_up']);
								}
								$file->move_file('download/club_files', true, false, false, false);
							}
							$bc->edit_post($post_ary);

							$redirect = append_sid("{$phpbb_root_path}clubs.$phpEx", 'mode_clubs=post&submode=view&pid=' . $original_post['post_id']);

add after

Code: Select all

$sql = "SELECT forum_edit
							 FROM " . POINTS_VALUES_TABLE . " 											ORDER BY forum_edit";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				$db->sql_freeresult($result);

$edit_points = (float) $row['forum_edit'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $edit_points . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
fine! its not so hard to do this.. but im thinking about making this an extra addon and not including this in the basic package cause users dont need it when they are not running the ultimate points system on their board!

with this u can at least check if the ups is installed... ;)

Code: Select all

if (file_exists($phpbb_root_path . 'includes/points/functions_points.' . $phpEx))
{
do_what_ever;
}
the functions in my package also are in the includes folder.. so that would have to be changed.. ;)


grz woipi
My mods: Ultimate Board Clubs
Support: only for the UBCS!
-----
function be_friends($uid, $u){return ($u == $user->['user_id']) ? false : true;}
$this->be_friends($uid, $user->['user_id']) ? $allow_pm : echo "You failed again";
Locked

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