HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Mass Delete for Images/Emoticon

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#106169 (In Topic #20720)
Avatar

Fan in training

Mass added Emojione Images (wish I didn't)

I wanted to use a different set of Emoticon/Emoji for ocportal, so I found EmojiOne that uses a creative commons license that I could agree with (but not the software license, just the license for the images)

I used Imagemagick to resize the set of images and OptiPNG to optimize the PNGs and then mass uploaded them in a Zip file.

(BIG MISTAKE!!!) :'(

The problem I'm having is that now it has slowed down the ocPortal website to a crawl and deleting them one at a time is nearly impossible... (a total of 1053 images!) I've thought about deleting them via FTP, but I would think that the entries would still be left in the database and damage the database (unsure about this).

Is there a good way to handle this and my database entries, or should I start all over and reinstall ocP? :o
Back to the top
 
Posted
Rating:
#106171
Avatar

Delete them, then recreate the emoticon table. This is an export from an install I have, assumes 'ocp_' table prefix.

Code

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `ocp_f_emoticons`;

CREATE TABLE `ocp_f_emoticons` (
  `e_code` varchar(80) NOT NULL,
  `e_theme_img_code` varchar(255) NOT NULL,
  `e_relevance_level` int(11) NOT NULL,
  `e_use_topics` tinyint(1) NOT NULL,
  `e_is_special` tinyint(1) NOT NULL,
  PRIMARY KEY (`e_code`),
  KEY `relevantemoticons` (`e_relevance_level`),
  KEY `topicemos` (`e_use_topics`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert into `ocp_f_emoticons` values(':P','ocf_emoticons/cheeky','0','1','0'),
 (':\'(','ocf_emoticons/cry','0','1','0'),
 (':dry:','ocf_emoticons/dry','0','1','0'),
 (':$','ocf_emoticons/blush','0','1','0'),
 (';)','ocf_emoticons/wink','0','0','0'),
 ('O_o','ocf_emoticons/blink','0','1','0'),
 (':wub:','ocf_emoticons/wub','0','1','0'),
 (':cool:','ocf_emoticons/cool','0','1','0'),
 (':lol:','ocf_emoticons/lol','0','1','0'),
 (':(','ocf_emoticons/sad','0','1','0'),
 (':)','ocf_emoticons/smile','0','0','0'),
 (':thumbs:','ocf_emoticons/thumbs','0','1','0'),
 (':offtopic:','ocf_emoticons/offtopic','0','0','0'),
 (':|','ocf_emoticons/mellow','0','0','0'),
 (':ninja:','ocf_emoticons/ph34r','0','1','0'),
 (':o','ocf_emoticons/shocked','0','1','0'),
 (':rolleyes:','ocf_emoticons/rolleyes','1','1','0'),
 (':D','ocf_emoticons/grin','1','1','0'),
 ('^_^','ocf_emoticons/glee','1','1','0'),
 ('(K)','ocf_emoticons/kiss','1','0','0'),
 (':S','ocf_emoticons/confused','1','1','0'),
 (':@','ocf_emoticons/angry','1','1','0'),
 (':shake:','ocf_emoticons/shake','1','1','0'),
 (':hand:','ocf_emoticons/hand','1','1','0'),
 (':drool:','ocf_emoticons/drool','1','1','0'),
 (':devil:','ocf_emoticons/devil','1','1','0'),
 (':party:','ocf_emoticons/party','1','0','0'),
 (':constipated:','ocf_emoticons/constipated','1','1','0'),
 (':depressed:','ocf_emoticons/depressed','1','1','0'),
 (':zzz:','ocf_emoticons/zzz','1','1','0'),
 (':whistle:','ocf_emoticons/whistle','1','0','0'),
 (':upsidedown:','ocf_emoticons/upsidedown','1','1','0'),
 (':sick:','ocf_emoticons/sick','1','1','0'),
 (':shutup:','ocf_emoticons/shutup','1','0','0'),
 (':sarcy:','ocf_emoticons/sarcy','1','1','0'),
 (':puppyeyes:','ocf_emoticons/puppyeyes','1','1','0'),
 (':nod:','ocf_emoticons/nod','1','0','0'),
 (':nerd:','ocf_emoticons/nerd','1','1','0'),
 (':king:','ocf_emoticons/king','1','1','0'),
 (':birthday:','ocf_emoticons/birthday','1','1','0'),
 (':cyborg:','ocf_emoticons/cyborg','1','0','0'),
 (':hippie:','ocf_emoticons/hippie','1','1','0'),
 (':ninja2:','ocf_emoticons/ninja2','1','1','0'),
 (':rockon:','ocf_emoticons/rockon','1','0','0'),
 (':sinner:','ocf_emoticons/sinner','1','0','0'),
 (':guitar:','ocf_emoticons/guitar','1','0','0'),
 (':christmas:','ocf_emoticons/christmas','1','0','0');

SET FOREIGN_KEY_CHECKS = 1;


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#106390
Avatar

Fan in training

(When I saw that Chris Graham responding to my post, I could have been knocked down with a feather! Thank you, Thank you, Thank you! It's an honor!)

Thank you for all your help! :) I'm not to savvy when it comes to the database stuff, because I attempted to login to my servers phpMyAdmin, clicked on the SQL tab and pasted the code above into "Run SQL query/queries on server 'localhost':", then pressed enter for the last line and then clicked on the GO button and it came back with a Missing Value in the form! error popup.  I think I'm doing something wrong or something, but I can't figure out what that something is?  I think my SQL query is working properly because I was able to change the time_zone and confirm the changes with it.

Also, is it possible to fix in Tools -> Website Cleanup Tools?

Again, thank you for your help and once my website's established, I'll do anything and everything I can to promote and assist with ocP.  Your product is second to none! :thumbs:
Back to the top
 
Posted
Rating:
#106410
Avatar

Hi,

(Thanks ;))

Try clicking the button rather than pressing enter. I don't really know the issue, but I do know that enter on web forms doesn't always work as expected.

You can also do it in OcCLE, but it's a bit fiddly.

You need to split it out into 3 commands, with an '@' before each…

Code

@DROP TABLE IF EXISTS `ocp_f_emoticons`;

Code

@CREATE TABLE `ocp_f_emoticons` (
  `e_code` varchar(80) NOT NULL,
  `e_theme_img_code` varchar(255) NOT NULL,
  `e_relevance_level` int(11) NOT NULL,
  `e_use_topics` tinyint(1) NOT NULL,
  `e_is_special` tinyint(1) NOT NULL,
  PRIMARY KEY (`e_code`),
  KEY `relevantemoticons` (`e_relevance_level`),
  KEY `topicemos` (`e_use_topics`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Code

@insert into `ocp_f_emoticons` values(':P','ocf_emoticons/cheeky','0','1','0'),
 (':\'(','ocf_emoticons/cry','0','1','0'),
 (':dry:','ocf_emoticons/dry','0','1','0'),
 (':$','ocf_emoticons/blush','0','1','0'),
 (';)','ocf_emoticons/wink','0','0','0'),
 ('O_o','ocf_emoticons/blink','0','1','0'),
 (':wub:','ocf_emoticons/wub','0','1','0'),
 (':cool:','ocf_emoticons/cool','0','1','0'),
 (':lol:','ocf_emoticons/lol','0','1','0'),
 (':(','ocf_emoticons/sad','0','1','0'),
 (':)','ocf_emoticons/smile','0','0','0'),
 (':thumbs:','ocf_emoticons/thumbs','0','1','0'),
 (':offtopic:','ocf_emoticons/offtopic','0','0','0'),
 (':|','ocf_emoticons/mellow','0','0','0'),
 (':ninja:','ocf_emoticons/ph34r','0','1','0'),
 (':o','ocf_emoticons/shocked','0','1','0'),
 (':rolleyes:','ocf_emoticons/rolleyes','1','1','0'),
 (':D','ocf_emoticons/grin','1','1','0'),
 ('^_^','ocf_emoticons/glee','1','1','0'),
 ('(K)','ocf_emoticons/kiss','1','0','0'),
 (':S','ocf_emoticons/confused','1','1','0'),
 (':@','ocf_emoticons/angry','1','1','0'),
 (':shake:','ocf_emoticons/shake','1','1','0'),
 (':hand:','ocf_emoticons/hand','1','1','0'),
 (':drool:','ocf_emoticons/drool','1','1','0'),
 (':devil:','ocf_emoticons/devil','1','1','0'),
 (':party:','ocf_emoticons/party','1','0','0'),
 (':constipated:','ocf_emoticons/constipated','1','1','0'),
 (':depressed:','ocf_emoticons/depressed','1','1','0'),
 (':zzz:','ocf_emoticons/zzz','1','1','0'),
 (':whistle:','ocf_emoticons/whistle','1','0','0'),
 (':upsidedown:','ocf_emoticons/upsidedown','1','1','0'),
 (':sick:','ocf_emoticons/sick','1','1','0'),
 (':shutup:','ocf_emoticons/shutup','1','0','0'),
 (':sarcy:','ocf_emoticons/sarcy','1','1','0'),
 (':puppyeyes:','ocf_emoticons/puppyeyes','1','1','0'),
 (':nod:','ocf_emoticons/nod','1','0','0'),
 (':nerd:','ocf_emoticons/nerd','1','1','0'),
 (':king:','ocf_emoticons/king','1','1','0'),
 (':birthday:','ocf_emoticons/birthday','1','1','0'),
 (':cyborg:','ocf_emoticons/cyborg','1','0','0'),
 (':hippie:','ocf_emoticons/hippie','1','1','0'),
 (':ninja2:','ocf_emoticons/ninja2','1','1','0'),
 (':rockon:','ocf_emoticons/rockon','1','0','0'),
 (':sinner:','ocf_emoticons/sinner','1','0','0'),
 (':guitar:','ocf_emoticons/guitar','1','0','0'),
 (':christmas:','ocf_emoticons/christmas','1','0','0');

I tested and it worked for me. Ignore that when you paste in the command it compresses onto a single line. Ignore the "Error: Your search yielded no results." lines. OcCLE expects results from the queries, but it does work.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#106437
Avatar

Fan in training

2nd method worked like a charm.  Thanks! :thumbs:

ocPortal has been the best experience I've ever had with a CMS! :) Some of my issues might stem from the fact that I'm using Lighty (I know, shame on me) instead of Apache but ocPortal is humming along on an embedded system nicely.

(Was going to add [solved] to the title, but I'm unable to do so.)

Hoping next time I come back it'll be to help out others with ocP instead of asking for help.  Thanks again!

BTW - on the crying :'( emoji - even on install, I'm unable to select it to change it's properties on the 'Edit emoticon' screen, but I am able to change the image in 'Manage Theme Images'...  But from what you've shown me, I can figure out a new way to handle it.  Thanks-a-million!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: