what is the digest in iforum used for

Can anyone tell me what the 'digest' functionality in iForum is used for? And whether it IS used? 

Topic | Forum


Re: Which modules to prioritize for updates?

Re: Profile - thanks.

Re: ICMS 2.0 - I'm noticing a debug message occasionally about being unable to write session data at the close of a session. It doesn't seem to hinder anything and is not constant. May be related to your blank page after some time has elapsed?

Topic | Forum


Re: Which modules to prioritize for updates?

Profile needs lots of fundamental security  fixes, and there is at this moment nobody maintaining it. More details on H1.



Re: Which modules to prioritize for updates?

What's the latest version of the profile module? I had version 1.3 present and not installed on the SimplyWiki site and when I upgraded it to ICMS 2.0, the module admin page was broken - lots of old class and object references. Once I removed the folder, everything was fine.

BTW - www.simplywiki.org is now running on ImpressCMS 2.0!



Re: Which modules to prioritize for updates?

well, MariaDB should, in theory, be compatible with MySQL, but there will of course always be subtle differences in how they work. But it's becoming a popular alternative to Oracle's MySQL so it would be logical to verify the compatibility.

I was first thinking of patching up the downloads module, to have a more or less quick fix. But given the number of issues you encountered already, perhaps it will be faster to re-start from scratch then. I've been analysing some parts for several months now, I'll see how it goes.

When it comes to modules that would be nice to get to work on 2.0 : imbuilding could definitely use an update, both in its working (I never got it to work in its latest version) and in the code it generates.



Re: Which modules to prioritize for updates?

mariaDB isn't something I work with, so let me know!

I would like a Downloads module - trying to migrate to Downloads (QM-B's module) isn't working fully. I've found some things related to how the db schema is handled by IPF and how the latest MySQL won't allow default values for text, blob, or json fields.



Re: Which modules to prioritize for updates?

I installed it on a PHP 7.4 running ImpressCMS 2.0 RC2 with mariaDB10, the database might also be a factor. I'll verify today (it's past midnight, woo-hoo )

I was thinking of perhaps extending the downloads module we now use on icms.org with tagging support (imtagging or sprockets) and using a label to indicate compatibility.



Re: Which modules to prioritize for updates?

Thanks, David!

I'm having pretty good luck with imBlogging - it's a module I've used considerably. And, with the changes I've been talking about in the icms_ipf_Metagan post, it's still working well. Basically, I'm using what's in the master branch on github, plus some changes I've shared in the metagen post.

For your blank page - could it be a permissions or cache issue?

What would be a good place to track which modules have been tested and work on 2.0, and which ones we'd like tested?



Re: Which modules to prioritize for updates?

I'm looking into the content module at the moment. I've already updated iforum to work with ImpressCMS 2.0 RC2 as well as news and sprockets.

I'm having trouble with imblogging : I can't get the blog overview page to work. The rest is humming along nicely but I get a white page after a long while when I go to the start page. Probably a timeout somewhere.



Which modules to prioritize for updates?

Trying to get a feel for which modules to focus on updating to work better with ImpressCMS 2.0 and up. Which ones are you using? Which ones are holding you back from upgrading to 2.0?



Re: Code review: icms_ipf_Metagen

I'm still uncovering a lot of hidden gems in the existing code base. For example, most uses of icms_ipf_Metagen don't make use of all the arguments available - there are 4: title, keywords, description, and 'category path'. Only the first argument is required. There isn't a lot of information about these arguments in the comments. So, read and experiment!

As it turns out, imBlogging constructs $categoryPath and it does much of what I'm setting out to do - utilize the category, author, and other filters that could change the content of the index page. icms_ipf_Metagen->setTitle() does use the 4th argument in preparing what the meta title will be.

Here's how I'm using it now in imblogging/index.php, in the same spot as in my previous post -

// some combination of the module, category, author, and page #

$page_title = icms_getModuleName(false);

 

// some combination of the module, category, author, and page #

$page_keywords = $icmsModuleConfig['module_meta_keywords'];

 

// some combination of the module, category, author, and page #

$page_description = $icmsModuleConfig['module_meta_description'];

 

// icms_ipf_Metagen takes 4 arguments - the last is 'categoryPath'

$page_category_path = $category_path;

 

/* Generating meta information for this page */

$icms_metagen = new icms_ipf_Metagen($page_title, $page_keywords, $page_description, $page_category_path);

$icms_metagen->createMetaTags();

Except for the pagination factor, the page title is  now different in more cases than it was before - good for all things SEO and SERPs. Because the content of each page is going to change as posts are added, is this going to be much of a factor? That post that was on page 1 last month might be on page 2 next month, along with several other posts. I think I'll leave this and focus next on the logic for addressing the various sources of keywords and description.



Re: Code review: icms_ipf_Metagen

A lot of interesting things have come out of this review! There are several things that can be done to improve your overall SEO with a few updates to the modules that leverage the IPF classes.

One of the most important things for every site's SEO is having unique page titles. This becomes challenging when the script page doesn't change and the arguments passed to the page change. For example, in imBlogging, index.php can display a list of the most recent blog posts, blog posts in a particular category (imTagging), or posts by a particular author. These all can have multiple pages, so the page number is also a component of the page.

icms_ipf_Metagen:_construct() has arguments to help with all this. The first argument is the page title, the second is the page keywords, the third argument is the page description. There is a fourth argument (category path) that I'm still investigating.

A few things that I have found beneficial -

  • Add a module meta keywords configuration option
  • Add a module meta description configuration option
  • Add a module 'show module name in breadcrump' option

These can all be done by adding a few lines to your icms_version.php file and updating the module from the admin control panel. You also need to add some language constants to describe these options before updating the module.

For imBlogging, here's what I added

$modversion['config'][] = array(
    'name' => 'show_mod_name_breadcrumb',
    'title' => '_MI_IMBLOGGING_MODNAME_BREADCRUMB',
    'description' => '_MI_IMBLOGGING_MODNAME_BREADCRUMB_DSC',
    'formtype' => 'yesno',
    'valuetype' => 'int',
    'default' => 1);

$modversion['config'][] = array(
    'name' => 'module_meta_keywords',
    'title' => '_MI_IMBLOGGING_KEYWORDS',
    'description' => '_MI_IMBLOGGING_KEYWORDS_DSC',
    'formtype' => 'textbox',
    'valuetype' => 'text',
    'default' => '');

$modversion['config'][] = array(
    'name' => 'module_meta_description',
    'title' => '_MI_IMBLOGGING_METADESC',
    'description' => '_MI_IMBLOGGING_METADESC_DSC',
    'formtype' => 'textbox',
    'valuetype' => 'text',
    'default' => '');

The language constants go in {your module}/language/{your language}/modinfo.php. For these additions, it would look like this -

define('_MI_IMBLOGGING_MODNAME_BREADCRUMB', 'Include Module Name in Breadcrumb and Title');
define('_MI_IMBLOGGING_MODNAME_BREADCRUMB_DSC', 'Do you want the module name included as part of the paget title?');
define('_MI_IMBLOGGING_METADESC', "Module's Meta Description");
define('_MI_IMBLOGGING_METADESC_DSC', 'The meta description to be used for the main page of the module');
define('_MI_IMBLOGGING_KEYWORDS', 'Default keywords for the module');
define('_MI_IMBLOGGING_KEYWORDS_DSC', 'The meta keywords to be used for the main page of the module');

Adding this will do nothing to your front end - unless you make some modification there, too. The page that benefits most from this is the index.php at the root of the module (imblogging/index.php). It does not have anything to generate meta tags (current release). Adding it is quite simple and once the above options are added and values are saved in them, you'll have a page title, meta keywords, and meta description you can influence from your admin page. I've added this just before the inclusion of the footer -

/**
 *  Generating meta information for this page
 *  This page will generate several 'pages'
 *  As the number of posts increases, there will be multiple pages
 *  The page can also be filtered by category (imTagging) - which has its own meta properties
 *  And, you can get a list of posts by an author
 *  We need to account for all these to provide unique page titles for them all (at a minimum)
 */

// some combination of the module, category, author, and page #
$page_title = icms_getModuleName(false);

// some combination of the module, category, author, and page #
$page_keywords = $icmsModuleConfig['module_meta_keywords'];

// some combination of the module, category, author, and page #
$page_description = $icmsModuleConfig['module_meta_description'];

/* Generating meta information for this page */
$icms_metagen = new icms_ipf_Metagen($page_title, $page_keywords, $page_description);
$icms_metagen->createMetaTags();

As you can see, the variables that affect the page content can be made part of the title, the keywords, and the description. For now, it is pretty simple and I'm still working on the logic to update based on category, author, and page. I'll post an update once I have an approach for them. If you have ideas and suggestions - feel free to post them here!

Oh - and for you to see this in your site, you'll need a theme that uses the core meta variables, like this, as an example -

        <title><{if $icms_pagetitle !=''}><{$icms_pagetitle}> - <{/if}><{$icms_sitename}></title>
        <meta name="keywords" content="<{$icms_meta_keywords}>" />
        <meta name="description" content="<{$icms_meta_description}>" />

As it stands, this will give you a different page title, meta keywords, and meta description for the main page of this module (and others like it). I'll post updates so that the category, author, and page # will also automatically update these values.



Re: set permissions

This was added to the wiki soon after this!



Re: Which of our publishing modules (news, articles, etc) support group-level permissions?

The method for managing permissions is part of the core - and we have a nice tutorial in the wiki from QM-B on how he implemented it that started out as a discussion in the forums.



Re: Code review: icms_ipf_Metagen

There's so much to be found in the forum! And there are a lot of yet to be utilized parts of the core.

Here's one about opengraph and schema.org - Re: Question about facebook social plugin - a mere 10 years ago.



Re: Code review: icms_ipf_Metagen

There are other meta data that should be controlled by the site - some are not relevant for all, like location and geo data. To move towards a 'no code' solution, where this is done through the admin panel or a module, we'll have to consider impact for those, like you and I, that have built themes to include these data and what injecting the new meta data into the theme and how we go about doing it.

Back on the easy stuff: There's a config option being checked by the current metagen methods - $icmsModuleConfig['show_mod_name_breadcrumb'] - that I don't believe is in any module. It is part of the title generation and the breadcrumb generation. Just so you know.



Re: Code review: icms_ipf_Metagen

You are using the same pragmatic approach I've used until now, but this kind of functionality really shouldn't be handled in the theme layer or each module separately, but site-wide. Whether we make metagen smarter or extensible, or have a separate module to handle the metadata on a site-wide bases are both possibilities.



Re: Code review: icms_ipf_Metagen

I've built in the metadata for open graph (Facebook/Instagram and Pinterest, mostly) and Twitter into the themes I use, using the same template vars ($icms_pagetitle, $icms_meta_keywords, $icms_meta_description, etc).

The next thing I was hoping to work out is a method for determining the components of each value. You could set preferences to change the pattern of your pagetitle - like %post title% %category% %module% - %sitename%, or %category%: %post title% - %module%, %sitename%. That way, you have control and flexibility, and you don't have to edit a bunch of files to make changes.

This method would also allow you to make it work with whatever theme you were using. Again, without having to edit the theme.



Re: Code review: icms_ipf_Metagen

PHPStorm identifies loads of parts of the code that contain repetitive statements, so your findings are more or less expected. We can't fix them all at once, and the metagen is a good place to start.

This is an area that can be more fleshed out as well, I would expect the metagen function to be able to generate other metadata like the ones for facebook, twitter (sorry, 'X'), linkedin, schema.org and the likes.

When metagen was developed, those newer systems weren't there yet (or not as ubiquitous), now they're the norm and search engines have reduced or dropped the importance of the fields we're generating at the moment.



Re: Code review: icms_ipf_Metagen

Here are some code snippets to look at -

libraries/icms/ipf/Metagen.php - setTitle()

These both have this:  @todo Remove this and use the proper data filter and HTML Purifier

include/functions.php - icms_html2text()

include/functions.php - icms_purifyText()

My review is that at this point, when the title tag is being rendered, the title has already been filtered and purified before being saved in the database, and then retrieved and sent to these functions. It's important to note that the title is not sent through these functions for rendering on the page.




 Top