We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28100
    • 66 Posts
    I’ve got Newspublisher running but found that it was missing 2 images (cal.gif and cal_nodate.gif) - and the directory they should be contained in. See lines 93 and 94.

    • manager/media/images/icons/cal.gif
    • manager/media/images/icons/cal_nodate.gif

    Anyway, I created the new directory(s) needed for modx and used the images from etomite ... but just thought someone might want to know. smiley
      • 22289
      • 41 Posts
      Is this the only thread for NewsPublisher..? I can’t find any other.

      In any event, I’m curious- is there any way that a document object created by NewsPublisher can be classed as unsearchable as soon as it is generated?
      • Quote from: ooghe at Apr 11, 2008, 03:58 PM

        is there any way that a document object created by NewsPublisher can be classed as unsearchable as soon as it is generated?
        There is an option in the site Configuration to make documents unsearchable by default.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 22289
          • 41 Posts
          that helps, certainly- but would there then be a way to generate other docs that *would* default to searchable?

          Maybe this sounds like an odd request, but there is a setup I have wherein a Ditto-driven RSS feed I know will be available only to certain users would refer to the entire contents of a particular directory, but other ditto calls throughout the site are filtering out of that same directory by other criteria- and many documents I don’t want possibly coming up in a site search. The user generating all these documents this is doing so by submitting to NewsPublisher as a webuser, and I’d like to avoid having to make this person then go through manager to individually set things to searchable or unsearchable.

          My inelegant solution so far has been to make separate NewsPublisher calls that request different templates for submissions, one of which is basically blank so that at least google won’t be looking at that information, but is still read by the Ditto RSS call. It would be great if I could make it so *that particular blank template* defaults to unsearchable as well, so i am now trying to figure out whether there is some way to do this.

          Another possible solution could come from AjaxSearch, if I could somehow set it to not return results using a blank template. I see it can be configured to exclude items not listed in menus, but that is too broad.

          Finally, I might explore MetaTagsExtra, if somehow AjaxSearch respects those metatags.
          • Well, it doesn’t have that ability as it is, but it wouldn’t be difficult to add it; just follow the example of the "showinmenu" option and add a couple of lines to the snippet code.

            #    &showinmenu  - sets the flag to true or false (1|0) as to whether or not it shows in the menu. defaults to false (0)
            ...
            // get menu status
            $hidemenu = isset($showinmenu) && $showinmenu==1 ? 0 : 1; // line 76
            ...
                            'hidemenu'        => $hidemenu, // in the $flds array for inserting into the database line 220
            

            So you could just add
            # &searchable - sets the flag to true or false (1|0) whether the document is searchable, defaults to true
            ...
            // get searchable status
            $searchable = isset($searchable) ? 1 : 0; // around line 76
            ...
                         'searchable'         => $searchable // around line 220
            

            Then you could specify with a snippet parameter &searchable=`0`
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 22289
              • 41 Posts
              I can’t for the life of me figure why, but this doesn’t seem to work. I’ve replicated the line out exactly as you suggest, cited the variable in line 220... and added in the param to the NewsPublisher... but doesn’t seem to be carrying over for some reason.

              Is there some other aspect to ’searchable’ as defined elsewhere that would prevent this from being modifiable this way? It’s really a stumper.

              One clue- the default setting in the site configuration seems to overrule whatever happens with the added ’searchable’ parameter in any variation of settings I try.

              I’ll keep studying this though- it is a big help.