[MOD] Rules Mod 1.0.6 bèta

Misc MOD Downloads for phpBB3 -- Any MOD that does not fit into any other category
Forum rules
Image Please feel free to download any MOD's here, support for each MOD is located it's own thread.

To post your own MOD, please first read the MOD Guidelines

What do you think about my rules mod?

Great! Just what I needed!
21
88%
Good!
2
8%
Fair
1
4%
Poor
0
No votes
 
Total votes : 24

Re: [MOD] Rules Mod 1.0.6 bèta

Postby Ladysarajane » 29 Jan 2008, 14:51

Maybe in the directions add first the part that if this is the first custom field on the forum you are okay to run the query as stated, other wise follow "MAKE SURE YOU CHANGE THE FIELD_ID VALUE TO THE CORRESPONDING ORDER NUMBER IN 'CUSTOM PROFILE FIELD' SECTION OF ACP!!"

People that are comfortable with their databases won't have a problem, but new people will have trouble identifying what number to put in. :scratch:

The new window would solve the problem of leaving the registration page. Unfortunately I don't know how to write that. Hmmm....wait a minute let me try this.

Code: Select all
<a href="http://YOURSITE.COM/YOURFORUMDIR/rules.php" target="_blank">Click to display them</a>


Let me try this!

Edit: IT WORKS!!! Duh...why didn't I think of that earlier.
I used this for my sql query to get the rules page to show in another window, so people can read the rules and not lose the registration page.
Code: Select all
INSERT INTO phpbb_profile_lang (field_id, lang_id, lang_name, lang_explain, lang_default_value) VALUES (1, 1, 'Do you agree with our forum rules?', '<a href="http://YOURSITE.COM/YOURFORUMDIR/rules.php" target="_blank">Click to display them</a>', '');
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [MOD] Rules Mod 1.0.6 bèta

Postby dutchie » 06 Feb 2008, 13:46

Hi,

Seems to work apart from the part when I have to paste the code into myphp.

I get the following error:

#1062 - Duplicate entry '1-1' for key 1

Any ideas?
dutchie    
Crewman
Crewman
 
Posts: 6
Joined: 05 Feb 2008, 15:18
Gender: Male

Re: [MOD] Rules Mod 1.0.6 bèta

Postby Ladysarajane » 09 Feb 2008, 23:11

dutchie wrote:Hi,

Seems to work apart from the part when I have to paste the code into myphp.

I get the following error:

#1062 - Duplicate entry '1-1' for key 1

Any ideas?


Do you have any custom profile fields on your forum?
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: [MOD] Rules Mod 1.0.6 bèta

Postby drazgo » 10 Feb 2008, 09:09

indeed, that'll be the problem, you will already have a custom profile field. Just change that FIELD_ID value to something else but 1 ;)
drazgo
Cadet III
Cadet III
 
Posts: 35
Joined: 11 Dec 2007, 11:03
Gender: Male

Re: [MOD] Rules Mod 1.0.6 bèta

Postby Ladysarajane » 10 Feb 2008, 11:00

:scratch: I can't think of any other way to obtain the next number for field id if a person already has custom profile fields on their boards. :scratch:
Maybe in the instructions for people that have and have had custom fields to add up that number and go one beyond it.
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: [MOD] Rules Mod 1.0.6 bèta

Postby dutchie » 10 Feb 2008, 13:33

Thanks guys. The weird thing is that as far as I know I don't have any other profiles other than than several different languages :scratch:

but after changing 1,1 to 2,1 I no longer get the sql error but......the link to rules.php does not display either :confused:

As I have 5 languages installed (Default is Lang_ID 1) now have field_id 2, lang_id 1.

Please advise thanks :beg:
dutchie    
Crewman
Crewman
 
Posts: 6
Joined: 05 Feb 2008, 15:18
Gender: Male

Re: [MOD] Rules Mod 1.0.6 bèta

Postby Ladysarajane » 10 Feb 2008, 15:59

Can you post an image for me? I need to see your phpmyadmin table. Something like this: Image

On the left click on phpbb_profile_fields and when that opens in the middle...at the top click on the browse tab and it should open up to show you something similar to what I have above.
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: [MOD] Rules Mod 1.0.6 bèta

Postby dutchie » 11 Feb 2008, 00:27

Hi,

Sure : )

sql.jpg


Thanks :thumbsup:
dutchie    
Crewman
Crewman
 
Posts: 6
Joined: 05 Feb 2008, 15:18
Gender: Male

Re: [MOD] Rules Mod 1.0.6 bèta

Postby dutchie » 11 Feb 2008, 00:30

Opps wrong file. That one was phpbb_lang the one you asked for was phpbb_profile_lang :doh:

sql2.jpg


and if it helps I have expanded that to:

sql4.jpg
dutchie    
Crewman
Crewman
 
Posts: 6
Joined: 05 Feb 2008, 15:18
Gender: Male

Re: [MOD] Rules Mod 1.0.6 bèta

Postby Ladysarajane » 11 Feb 2008, 13:25

:scratch: This is complicated for me because of the languages. What default language is your board? If it is English, then you need to eliminate the first field shown on picture. And change the english row(at the bottom that reflects the custom profile field in the ACP) to field_id 1
sql2_edited.JPG


That should fix the link to the rules page for you. Let me know if that helps you.

@Drazgo in half of the installs I have done with this mod on my localhost with and without custom fields already in use, The making of the custom profile field in the DIY inserts into the table, Making the sql query unnecessary. The only thing is I cannot get the ACP to make is the link to the rules (lack of html use in the ACP), making it necessary to go into the table and add the value manually.

I have no ideal how to write the SQL to just insert the link into the table.
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

PreviousNext

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: Baidu [spider] and 9 guests