FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


MySQL problem (as usual)





Scorpio
Well, I wanted to install "Remove Users Signature & Editing Privileges" mod for my phpbb forum

There are 2 mysql queries to execute

Quote:
-----[ SQL ]-----
#
ALTER TABLE `phpbb_users` ADD `user_allowsig` TINYINT( 1 ) DEFAULT '1' NOT NULL
#
#-----[ SQL ]-----
#
ALTER TABLE `phpbb_users` ADD `user_allowedit` TINYINT( 1 ) DEFAULT '1' NOT NULL


Should I do this from phpmyadmin? How exactly can I do this?

Please explain how to do this in a generalized way. i.e. For other queries as well.

Thank you
n0obie4life
I'll create a "how to run a phpmyadmin query" soon Rolling Eyes.

For now, just dump that SQL query here, it will generate a db_update.php file, scorpio, I'm sure you know how to run that file.
wumingsden
scorpio wrote:
Well, I wanted to install "Remove Users Signature & Editing Privileges" mod for my phpbb forum

There are 2 mysql queries to execute

Quote:
-----[ SQL ]-----
#
ALTER TABLE `phpbb_users` ADD `user_allowsig` TINYINT( 1 ) DEFAULT '1' NOT NULL
#
#-----[ SQL ]-----
#
ALTER TABLE `phpbb_users` ADD `user_allowedit` TINYINT( 1 ) DEFAULT '1' NOT NULL


Should I do this from phpmyadmin? How exactly can I do this?

Please explain how to do this in a generalized way. i.e. For other queries as well.

Thank you



Go to www.yoursite.com/phpmyadmin or www.yoursite.frih.net/phpmyadmin ---> Sign In ---> Select which database you want to edit from the side of the window if there is more than one ---> At the top of the page click the "SQL" tab ---> In the textbox paste the following code:

Code:
ALTER TABLE `phpbb_users` ADD `user_allowsig` TINYINT( 1 ) DEFAULT '1' NOT NULL;
ALTER TABLE `phpbb_users` ADD `user_allowedit` TINYINT( 1 ) DEFAULT '1' NOT NULL;


---> then click "Go". A results page will then show showing the successful queries and/or errors that have occured with the code.

Did you recieve my PM about the AJAX Poll Script ?

Update: it seems N4L has given you another solution. All you'll have to go on that is go to the link, enter in the SQL code above and save the file on your PC, then upload it into your forum/ directory. Then you have to access it via www.yoursite.com/forum/db_update.php whilst signed in as admin. the results will then show. if successful you should then delete the file form your server due to security risks
Scorpio
Thank you. I did it.. Very Happy

EDIT: Wumingsden's method worked perfectly. Thank you n4l too.

I got your poll script, but I want to know if you got the poll script working without modifying anything except the Database Stuff, or did you have to modify the code.?

EDIT 2::

If I dont permit it, The user names cannot be changed by the users, right,?

I want to know how to grey out that box in the Users Profile Area.

This is because, the users can enter new names and simpley click the submit button, though it wont be effective. I dont want them to enter or even select that box.
wumingsden
scorpio wrote:
Thank you. I did it.. Very Happy

EDIT: Wumingsden's method worked perfectly. Thank you n4l too.

I got your poll script, but I want to know if you got the poll script working without modifying anything except the Database Stuff, or did you have to modify the code.?

EDIT 2::

If I dont permit it, The user names cannot be changed by the users, right,?

I want to know how to grey out that box in the Users Profile Area.
This is because, the users can enter new names and simpley click the submit button, though it wont be effective. I dont want them to enter or even select that box.


Quote:
I got your poll script, but I want to know if you got the poll script working without modifying anything except the Database Stuff, or did you have to modify the code.?


I had to modify the code, not database. Its poorly scripted in my opinion although i will use it on my site, pretty cool.

Quote:
If I dont permit it, The user names cannot be changed by the users, right,?


if your referring to a phpBB forum then members by default cannot change their username. This can however be changed in the main configuration in the ACP

Quote:
I want to know how to grey out that box in the Users Profile Area.
This is because, the users can enter new names and simpley click the submit button, though it wont be effective. I dont want them to enter or even select that box.


you could manually edit the file to give the box a colour different to the rest, is this what your after ? if so then you'll have to...

open:

/templates/*template_name*/profile_add_body.tpl

Find:

Code:
   
   <tr>
      <td class="row1" width="38%"><span class="gen">{L_USERNAME}: *</span></td>
      <td class="row2"><input type="hidden" name="username" value="{USERNAME}" /><span class="gen"><b>{USERNAME}</b></span></td>
   </tr>


In-Line Find:

Code:
name="username" value="{USERNAME}"


After Add:

Code:
 style="background-color: #??????; color: #??????";


"??????" to the hex colour that you want the username box to look like. This will not stop people entering text but will change the colour to a different one. note that this should work, i have never tried it before.
Scorpio
It is not about changing the color of the text box, but about "greying it out so as not to use it"

Like in Visual Basic you use this

For a text box, if you want it greyed out you use the command

text1.enabled=false

Similarly, can we modify this..

Also, about the poll script, can you give me the modified version, since you say that the original script was poorly scripted?
Related topics
mysql problem
ALTER TABLE mySQL problem.
mysql problem
What is useful way in this php+mysql problem?
MySQL problem...
Mysql problem
MySQL HELP!!
MySQL problem :'(
MySQL Problem
mysql problem
mySQL problem
header already sent? (and now introducing a mysql problem)
server -4 Mysql problem
MySQL problem - Can't insert stuff in to database
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.