[2.0.6] Smilies Order

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
37
63%
Very Good
8
14%
Good
7
12%
Fair
2
3%
Poor
5
8%
 
Total votes: 59

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

No objections, but Fearless already pointed out to Pinecamguy that Pine didn't run the SQL commands.

For everyone reading this, it is very important to follow the code I had in the .mod file of

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_smilies ADD smilies_order INT( 5 ) NOT NULL;

#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config VALUES ('smilies_insert', 1);
(replacing the phpbb_ with your prefix, so for BoneChrif, that is [as figured out] phpbb2) (the second one isn't as important, there is a default value used as well, but if you don't do this one, you can't change where new smilies are added)
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

straywind
Registered User
Posts: 14
Joined: Mon Jan 12, 2004 1:56 am

Post by straywind »

This is actually a pretty easy mod, I had it installed correctly 3 times and I'd have known that if my tables weren't screwy. It's very handy and a lot quicker than making a smilie pak. I'd like to see this incorporated into future versions of phpbb, it's a good tool for emoticon fanatics like myself.

fbaillie
Registered User
Posts: 27
Joined: Fri Oct 25, 2002 2:30 pm

Smilies order problem

Post by fbaillie »

I have this same problem and being a mysql newbie I can't figure out how to add a column or field to the database to fix this problem.

Can someone please help :?

Pinecamguy wrote: I got a successful easyMOD install. Then went to my smilies in admin panel and got:

Couldn't obtain smileys from database

DEBUG MODE

SQL Error : 1054 Unknown column 'smilies_order' in 'order clause'

SELECT * FROM phpbb_smilies ORDER BY smilies_order

Line : 631
File : /home/pinecam/www/phpBB2/admin/admin_smilies.php


Also, when trying to post.. there are no smiles anymore :cry:

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

http://www.phpbb.com/kb/article.php?article_id=151

Read that, it has the information I believe should help
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

fbaillie
Registered User
Posts: 27
Joined: Fri Oct 25, 2002 2:30 pm

Post by fbaillie »

Thank you.

I assume the example shown insrets the field "test" into the database phpbb_config.

I want to add the field "ORDER_BY" at the end of the database phpbb_smilies.

Is the correct command -

INSERT INTO phpbb_smilies (config_name, config_value) VALUES ('ORDER_BY', "0");

and will it be inserted in the correct place so that the MOD will work?

Sorry for the trouble but I am really new at mysql.

Thanks

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

No, that isn't what you would need. You need to run the SQL commands I listed just a few posts up (here) primarily the ALTER.

These two SQL lines are the first things the MOD instruction file says to do.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

fbaillie
Registered User
Posts: 27
Joined: Fri Oct 25, 2002 2:30 pm

HEEEEEELP

Post by fbaillie »

OK I'm way out of my league here.

Can I undo the MOD, if so how?

I've got problems in the forums where smilies have been used.

Thanks

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Unless you have backup files (which you really should have, the MOD disclaimer says to have it), many people have problems undoing the code they added, but you do just what the MOD said to do, but in reverse.

Running the SQL really isn't that hard to do, but because you (and others) have had problems, I will now provide a suplimental sql install file:

If you are getting the above error Unknown column 'smilies_order' in 'order clause' you have not run the SQL commands mandated at the start of the MOD Instructions. Please Download the Smilies Order SQL Installer

This file is a zip file containing 1 php file "install_order_smilies.php" Place this in the directory that viewtopic.php is in, and then browse to this file. If you run the file multiple times, don't worry, it won't mess your site up (I placed several extra checks in it). If you have already run the SQL commands in the MOD file, running this php file will not hurt you either.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

fbaillie
Registered User
Posts: 27
Joined: Fri Oct 25, 2002 2:30 pm

Post by fbaillie »

I guess I'm really fouled up now. I read in the forum where I should overwrite all the files except config.php to uninstall the mod, so I did.

Now when I post even after running this script the postin showns the following, with red X box's all over.

SORRY !

If you'd like to see it it's at www.slpoa.net/phpBB2/

My admin username is - fbaillie and the password is - [:edit: LifeIsPain never give out your password like that on a public board:].


fbaillie
Site Admin


Joined: 17 Jan 2004
Posts: 4

Posted: 25 Jan 2004 07:21 am Post subject: Fixed

--------------------------------------------------------------------------------

"images/smiles/" alt="" border="0" />W"images/smiles/" alt="" border="0" />"images/smiles/" alt="" border="0" />"images/smiles/"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> alt="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> border="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />0"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> "images/smiles/" alt="" border="0" />/"images/smiles/" alt="" border="0" />>"images/smiles/" alt="" border="0" />e"images/smiles/" alt="" border="0" />'"images/smiles/" alt="" border="0" />r"images/smiles/" alt="" border="0" />"images/smiles/" alt="" border="0" />"images/smiles/"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> alt="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> border="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />0"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> "images/smiles/" alt="" border="0" />/"images/smiles/" alt="" border="0" />>"images/smiles/" alt="" border="0" />e"images/smiles/" alt="" border="0" /> "images/smiles/" alt="" border="0" />u"images/smiles/" alt="" border="0" />"images/smiles/" alt="" border="0" />"images/smiles/"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> alt="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> border="images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" />0"images/smiles/" alt="" border="0" />""images/smiles/" alt="" border="0" /> "images/smiles/" alt="" border="0" />/"images/smiles/" alt="" border="0" />>"images/smiles/" alt="" border="0" />p"images/smiles/" alt="" border="0" /> and running

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Well, it looks like you went to a clean board, and copying all the files over will do this (but if you installed other MODs, it will wipe these as well).

It is extremely unwise to post your admin password out in the open like this. It opens up a whole lot you can't track down from someone who may have read the post before I was able to edit it.

Anyway, I don't see the error you were talking about, there was one missing image in the post screen that had the file name truncated, but this would have come from some other change (possibly the database was edited to now allow longer file names as was the problem for straywind at first)
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

fbaillie
Registered User
Posts: 27
Joined: Fri Oct 25, 2002 2:30 pm

Post by fbaillie »

Thanks - yes I realized after that I goofed.

If you look at the message titled TEST you can see what I mean. It probably doesn't matter at this point

I'll reinstall the board from scratch. Is there a way to preserve the members login information? I see that the users are in the phpbb_users database, is copying it to the new installation OK?

boon.cc
Registered User
Posts: 191
Joined: Tue Sep 23, 2003 1:38 pm
Location: Somewhere in Spain

Post by boon.cc »

Can somebody tell me if the first file is corrected with allthe chages comented in this thread or I will have troubles installing this mod???
BOON ;)

boon.cc
Registered User
Posts: 191
Joined: Tue Sep 23, 2003 1:38 pm
Location: Somewhere in Spain

Post by boon.cc »

And please, can tell me how to do the SQL action???
BOON ;)

Fearless
Registered User
Posts: 664
Joined: Mon Mar 31, 2003 6:16 am

Post by Fearless »

boon.cc wrote: Can somebody tell me if the first file is corrected with allthe chages comented in this thread or I will have troubles installing this mod???


This mod should work as *is*. Like the author I have had it succesfully working on plain vanilla phpBB message board with the SubSilver template.
boon.cc wrote: And please, can tell me how to do the SQL action???


Sure. It depends on what host you've got but they usually offer an online tool called phpMyAdmin. If they do, find out how to access it and look up documentation on phpMyAdmin to find out how to execute SQL instructions on your database (always make a backup beforehand).

P.S: Sean Connery was the best James Bond ;) .

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

Indeed, Fearless is correct, the file does work as is, there were not any bugs with the MOD file. And for those who don't understand how to run the SQL commands, that is why I made this post that includes a link to download an SQL updater script (as in, you just have to run the file).

If another feature is required, I will update the download file to include the SQL installer, but I can't think of another feature that would fit with this MOD.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”