0
Welcome Guest! Login
0 items Join Now

Best way to submit patches for rokstories module?

  • Best way to submit patches for rokstories module?

    Posted 15 years 9 months ago
    • Hello,

      A quick search of the forum didn't tell me the best ways to contribute enhancements back upstream and I'm hoping someone can show me the best way.

      I've added a configuration item to the rokstories module which allows the user to append an &Itemid value. When paired with an existing/dummy menuitem, this allows the user to cause target modules to appear on the linked articles.

      Against mod_rokstories v0.6 (June)

      In helper.php at line 92:
              
      $useItemId = $params->get("itemid");
      if ($useItemId!="") 
      {
          $useItemId = "&Itemid=".$useItemId;
      }
       

      and append ".$useItemId" to line 237 as shown:
       
      if ($content_type=='joomla') {
          $lists[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid)).$useItemId;
          $images = modRokStoriesHelper::getImages($row->introtext,$thumb_size);
      } else {
       

      Finally, add the new parameter to modrokstories.xml at line 56:
      <param name="itemid" type="text" default="" label="Use Itemid" description="" />

      Thanks for a great module!
    • PCNW's Avatar
    • PCNW
    • Sr. Rocketeer
    • Posts: 100
    • Thanks: 0
    • Web design

    Re: Best way to submit patches for rokstories module?

    Posted 15 years 9 months ago
  • Re: Best way to submit patches for rokstories module?

    Posted 15 years 9 months ago
    • I guess the best way to illustrate would be to go to the site I made the change for (it's under construction).

      kirlin.developerx.com/demo1/

      Note that if you follow a "read more" link in the rokstories module, the target URL will have "&Itemid=147" appended to it. That allows me to include modules in the target link.

      My change was to allow the user to specify an ItemID in the module configuration backend, then have the link append that itemid to the target URL.

      Does that make sense?
    • JEM's Avatar
    • JEM
    • Preeminent Rocketeer
    • Posts: 17917
    • Thanks: 4

    Re: Best way to submit patches for rokstories module?

    Posted 15 years 9 months ago

Time to create page: 0.068 seconds