DeeEmm

Pragmatism in code

Waxing lyrical about life the universe and everything software related since lunchtime 2006.

EasyBlog - Display list of blog titles using the Latest Blogs module

When recently migrating the DeeEm.com site I needed a way to be able to organise the tutorials section so that each tutorial was easily accessible. This meant creating an index of blog posts so that visitors could browse through each category so see if there were any mods that applied to their site. Whilst EasyBlog makes provision for listing category titles, there is no way to list the blog posts without additionally showing an intro portion from the post itself. This is achieved using the 'Latest Blogs' module, and whilst there is a setting to control the length of text displayed, even setting this to the minimum possible value, you will still display a couple of newlines in the output.

Whilst digging though the code to see if there was a way that I could modify the CSS or core code to force the list to display as I wanted, I discovered that there is a hidden value within the administration settings for the module that hides the intro text. The solution is to manually apply this value by directly editing the database table.

The value in question is for the 'introtext' variable: (Content be taken from). This will only allow you to select between 'introtext' or 'main content'. What you cannot see is there is a third value 'Hidden'. I assume that this does not display, due to it having the value '-1', or at least it does not display in the browsers that I am using.

The solution is therefore very simple. 

Continue reading
19036 Hits
1 Comment

Jcomment to EasyBlog comment migration

The recent migration from Joomla 1.5 to Joomla 1.7 left me without a comments system for the tutorials section of the site. Previously this was handled by Jcomment, a great component that allows you to easily add commenting to standard Joomla articles, its only drawback, is that the Joomla 1.7 version is still some way from release.

After having taken a look at various options, including several other commenting systems, I decided that the best solution would be to import the tutorial articles into EasyBlog, mostly as this would help keep some continuity on the site. The migration of the posts went flawlessly, as expected, but this still left me with the actual comments to migrate. I briefly considered a manual migration, but then discovered that there are actually quite a few comments on the site.

After a bit of digging around I discovered that EasyBlog creates a table that cross references the old article ID's to the new ID's. This is created during the migration process and the values are stored in the '#__easyblog_migrate_content' table. Perfect for migrating the missing comments across.

Using this table I was able to change the object_id in the original jcomments table to match the new post_id for EasyBlog. I simply ran the following SQL statement from within phpMyAdmin. (You will notice that I've made a copy of the original table into the table h0ahq_oldjcomments, just in case.)

Continue reading
9070 Hits
0 Comments