|
Oct 12
2009
|
I noticed, while cruising around in phpmysqmin, after importing a couple hundred RSS articles with FeedGator into Joomla! that a lot of the content item's metas and attribs were missing. I especially didn't like that being the administrator, my id was associated with all these articles which I'm not authoring. The site's socialization features attribute them to me. I created a user called "joomlabot" so that I could assign all these site mechanic tasks to it. (Now, if I could just remember to login as joomlabot before performing site maintenance! ;)
"The needs of the many out weigh the needs of the few, or the one".
With over 3,000 article content items to juggle, I pondered the fastest way to update all these tables, and then go through the pain of updating those handful which are blog entries with other queries.
I used SQL query to fill in all the missing data for all the article content - in this case common among them all - are `created_by`, `attribs`, and `metadata`. I looked up the user ID of the joomlabot, wrote a set of pre-filled semi-empty attribs, and then set a 2 line metadata for author and follow.
Here's the code:
UPDATE `database_name`.`jos_content` SET `created_by` = 'Numeric ID of my bot', `attribs` = 'show_title=
link_titles=
show_intro=
show_section=
link_section=
show_category=
link_category=
show_vote=
show_author=
show_create_date=
show_modify_date=
show_pdf_icon=
show_print_icon=
show_email_icon=
language=en-GB
keyref=value
readmore=', `metadata` = 'robots=follow
author=joomlabot';
*read my comment below.







