Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
AM2 Virtual Search Results

 

 


dmsid
User

Apr 14, 2008, 10:54 AM

Post #1 of 20 (1807 views)
Shortcut
AM2 Virtual Search Results Can't Post

<!--#include virtual="/cgi-bin/artman/search.cgi?action=search&start=3&perpage=1&template=searchEngine/search_results_column.html"-->

Why does this only list the first story in AM2 and not the 3rd. I am using the default GlobalIndex rule.

I do not want to create lots of publishing rules, I just would like this to work.

This worked in AM1 just great.

<!--#include virtual="/cgi-bin/artman/exec/search.cgi?start=3&perpage=1&template=search/search_results_column.html"-->


MikeB
Staff / Moderator


Apr 14, 2008, 4:22 PM

Post #2 of 20 (1791 views)
Shortcut
Re: [dmsid] AM2 Virtual Search Results [In reply to] Can't Post

Hi,

Thanks for the post!

I've had a look at the include you're using here and it looks like there should be one quick change you'll want to make to this. Your query for the include should actually look like this:

/cgi-bin/artman/search.cgi?action=search&page=3&perpage=1&template=searchEngine/search_results_column.html

You'll notice that the difference here is that Article Manager 2 uses the "page" value rather than "start". You should still get the same effect though as it will bring up the third result for you.

I hope this helps! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


dmsid
User

Apr 14, 2008, 4:46 PM

Post #3 of 20 (1788 views)
Shortcut
Re: [MikeB] AM2 Virtual Search Results [In reply to] Can't Post

Maybe you could delete this post with the incorrect information from tech support in it. Thanks.

http://www.interactivetools.com/iforum/gforum.cgi?post=56114;search_string=start%3D;guest=11903200&t=search_engine#56114

Is there a list of the variable changes, it would save times. start, $art_num$, etc.


Jake
Staff / Moderator


Apr 14, 2008, 10:04 PM

Post #4 of 20 (1776 views)
Shortcut
Re: [dmsid] AM2 Virtual Search Results [In reply to] Can't Post

Hi dmsid,

It looks like those instructions were for an early version of Article Manager 2, and there have since been some changes as you've noticed.

If you want to check and see what placeholders are available on any given page in Article Manager 2, you can add this line of code to a template file, and then re-publish the affected pages:

<!-- templateplaceholderlist -->

That code will generate and display a table containing all available placeholders on that page. Smile
-----------------------------------------------------------
Cheers,
Jake Swanson - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.



dmsid
User

Apr 15, 2008, 8:08 AM

Post #5 of 20 (1771 views)
Shortcut
MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Thats for that hint, helps with some other stuff, but not for this below... :(

We used this line to print a specific article in AM1

<!--#include virtual="/cgi-bin/artman/exec/search.cgi?fields=art_num&keyword=424&perpage=1&template=search/search_results_column_header.html"-->

Here are changes for AM2, but they do not work.

<!--#include virtual="/cgi-bin/artman/search.cgi?action=search&fields=art_num&keyword=424&perpage=1&template=searchEngine/search_results_column_header.html"-->

What are the changes that need to be made.


(This post was edited by dmsid on Apr 15, 2008, 8:09 AM)


MikeB
Staff / Moderator


Apr 15, 2008, 1:19 PM

Post #6 of 20 (1764 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi,

Thanks for posting!

To bring up one specific article based on the article number, you'll just want to tweak your query and replace this value:

&fields=art_num

With this:

&keywordSearchFields=num

This should allow you to bring up only one result based on this specific article number.

I hope this helps! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


dmsid
User

Apr 15, 2008, 3:45 PM

Post #7 of 20 (1762 views)
Shortcut
Re: [MikeB] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

If does, thanks.

Is there a list anywhere of the vars we can use on a URL line for search and to be able to login into the admin area and run commands.

Would love to be able to have a URL that would login and just run one rule.

Read all the messages, but could not find a list of the line options for seach or for admin.cgi. Sure would help.


Jake
Staff / Moderator


Apr 15, 2008, 10:02 PM

Post #8 of 20 (1757 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi dmsid,

We don't have a list of these commands available anywhere, but if you're looking to do anything in specific we can definitely look into it for you.

It's possible to login and execute a "Publish All" by using a link like this:


Code
http://www.yoursite.com/cgi-bin/artman2/admin.cgi?loginUsername=LOGIN&loginPassword=PASSWORD&action=loginSubmit&nextaction=publishAll



Due to some limitations in the amount of actions that can be specified in a single URL, it's not possible to publish one specific rule with one URL. That being said, you can split the actions up into two URLs to accomplish this:



Code
http://www.yoursite.com/cgi-bin/artman2/admin.cgi?loginUsername=LOGIN&loginPassword=PASSWORD&action=loginSubmit 

THEN

http://www.yoursite.com/cgi-bin/artman2/admin.cgi?action=publishAll&selectedRuleNumbers=RULENUMBER&nextAction=publishRulesList


You'll want to replace everything in capital letters with the appropriate values. You can find out the publishing rule number by hovering over its "modify" link on the Admin -> Publishing page - it will be the last character in the URL.

Bear in mind that if you're looking to use some kind of automation tool to publish a certain rule on your site, it will need to have cookie support enabled in order to use these two URLs one after another successfully.

If you have any other questions about this, let us know. Smile
-----------------------------------------------------------
Cheers,
Jake Swanson - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.



dmsid
User

Apr 16, 2008, 8:11 AM

Post #9 of 20 (1756 views)
Shortcut
Re: [Jake] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

This is helpful, but I am at a loss as to why there is no easy way to do a publishALL or PublishUpdate from the command line from the server.

You have added many nice features to AM2, but at the same time have made many of the simple things much harder than AM1.

What I need to do is enable the server to automatically do a PublishALL like I was once able to do with AM1.

The publishing on the broswer with it Cookies and with the reloading of the browser is problematic at best. I can not use these commands you have provided like I have in the past with a server program because of them.

I have all read the posts on the site about this and find I am not the only one with this problem and there has been no real solution provided.

Please show me step by step on how I can have the server do a PublishALL and do not put it back into my lap to figure out.


MikeB
Staff / Moderator


Apr 16, 2008, 1:19 PM

Post #10 of 20 (1721 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi,

Thanks for the post! Smile

While there isn't anything built-in by default, I'm going to see if I can put together a simple script that will just run Article Manager's "Publish All" script. That said, because it wouldn't refresh the page at all, this could end up using quite a few resources on the server and there's the potential for time-out issues and I'm not exactly sure how, or if, this would work.

Prior to looking into a script like that, one thing I'm curious about is what the plan was for using this external script in Article Manager 2. With the new version of the software, when you add/remove/modify an article or category, only the appropriate files are re-created for you so you should find that this process will be quite a bit quicker than Article Manager 1. This means that because each of these necessary pieces are being published whenever they're updated you may be able to just use the software as it is by default without running any cronjobs. Any other details you have about this would be great.

I look forward to hearing from you! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


dmsid
User

Apr 16, 2008, 1:38 PM

Post #11 of 20 (1720 views)
Shortcut
Re: [MikeB] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Dear Mike:

Thanks. Here are the details. We have a slick way for users to layout the front page of their sites.

We use an outside Perl script that updates the globalIndex.html template. They fill out the article numbers on a form that looks like the front page. This way the user can control what stories show up on the front page and where they show up. Here is the code in the template our software updates.

<!--#include virtual="/cgi-bin/artman/search.cgi?action=search&keywordSearchFields=num&keyword=%%%article01%%%&perpage=1&template=searchEngine/search_results_column_header.html"-->

The %%%article01%%% is replace by the Perl script with an article number.

<!--#include virtual="/cgi-bin/artman/search.cgi?action=search&keywordSearchFields=num&keyword=424&perpage=1&template=searchEngine/search_results_column_header.html"-->

When they are done the script needs only need to re-generate the front page rule, but a PublishALL is good.

We DO NOT want the person that has access to update the stories on the front page, to have access inside AM2 at the publish articles level.

Maybe the script could do an ALL, or Rule: 1,5,6,12 and it could choose what rules to publish.

Let me know if you need more information.


Jake
Staff / Moderator


Apr 17, 2008, 8:29 PM

Post #12 of 20 (1700 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi dmsid,

I just wanted to give you a quick update and let you know that Mike is looking into the details of this custom script for you. Since this goes beyond our regular support capabilities, it might take him a bit of time to review everything.

We'll keep you updated in this thread. Smile
-----------------------------------------------------------
Cheers,
Jake Swanson - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.



dmsid
User

Apr 17, 2008, 8:52 PM

Post #13 of 20 (1698 views)
Shortcut
Re: [Jake] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Thanks. I think this will be a real bonus to all the AM2 users and a great feature to promote AM2.


MikeB
Staff / Moderator


Apr 18, 2008, 2:05 PM

Post #14 of 20 (1670 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi!

I've been having a look at this for you and I've attached a script called publishArticles.cgi to this forum post. This is a very basic script that goes through and publishes all of the enabled rules you have in the Admin->Publishing section of Article Manager. Because it's a basic CGI script, it should work quite well for your cron job and the only thing you'll want to note is that it will only work with installations of Article Manager 2 that are running MySQL. I've also only tested this with Article Manager v2.16.

Here are some details on how to use the script:

1. Upload this file to the /artman/utils/ directory and ensure that you set "Execute" permissions for this file (CHMOD 755)

2. Ensure that Article Manager is using a MySQL database (Admin->Database Editor).

3. From there, be sure that the publishing rules you'd like to have published by this program are set to "Enabled" in Admin->Publishing.

4. Set up your scheduled task/cron job to run this script (http://www.yoursite.com/artman/utils/publshArticles.cgi) and it should re-publish all of your content for you.

Let me know how this works for you! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


(This post was edited by MikeB on Apr 18, 2008, 4:09 PM)
Attachments: publishArticles.cgi (3.66 KB)


MikeB
Staff / Moderator


Apr 18, 2008, 4:12 PM

Post #15 of 20 (1661 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi Jon,

Thanks for the update about this!

I've made a quick change to this script, so I'd suggest re-downloading the script from the same link (I've re-attached the updated version to my original post) and giving it another try.

Let me know how this works out for you! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


dmsid
User

Apr 18, 2008, 4:24 PM

Post #16 of 20 (1658 views)
Shortcut
Re: [MikeB] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

This is working. Thanks for the effort.

Here is what I did.

File name: regenerate-site.cgi CHMOD (755)

#!/usr/local/bin/perl
use LWP::Simple;
my $url = 'http://www.yourdomainnamehere.com/cgi-bin/artman2/utils/publishArticles.cgi';
my $content = get $url;
my $message = substr $content, index($content, 'DONE');
print "Message: $message";
exit;

Is there anyway to also have this work right from the command line at the unix prompt? :)

Thanks for the extra effort. I am sure many people will find this helpful.


dmsid
User

Apr 18, 2008, 5:10 PM

Post #17 of 20 (1626 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Downloaded the new version. Appears to work great from the browser.

Does not run from the command line, but from the browser great. Thanks again.

==============================
NEW THOUGHT:

If I wanted to write a perl script that updated the "disabled" field in the publishrules database (MYSQL). Then I could run my publishrule disable/active script first to make active only the rules I wanted to publish, run your script and then run a script that set the publishrules back to their default state?

Your script is looking to only run publishrules that are active? Correct?


MikeB
Staff / Moderator


Apr 21, 2008, 4:06 PM

Post #18 of 20 (1565 views)
Shortcut
Re: [dmsid] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Thanks for the update! Smile

Was there an error or specific result when you ran this from the command line? If you can provide me any other details about this I'll have a look into this for you.

Regarding your new thought, yes this is something you could theoretically do. The script I provided you executes exactly what you have set up in Article Manager's admin program (Admin->Publishing) so any disabled rules will be skipped.

That said, from what you've mentioned you could create a script that would first enable all of your rules (or just some specific rules) and then do the same to set them back to disabled afterwards. If you do get something working for this, just let me know.

I hope this helps! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


TerriZ
User

Apr 24, 2008, 2:55 PM

Post #19 of 20 (1531 views)
Shortcut
Re: [MikeB] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi Mike,

I'm excited about using this script! I need to upgrade from 2.13 before I can determine if this will work; but in the meantime...if I knew there were only 2 or 3 rules I wanted to publish, could I hard-code that in your script? If yes, can you point me to where I would do that and maybe what an example would be? (I'm not a programmer)

Thanks in advance for *any* help!

Peace,
Terri Z



Terri Zwierzynski
Solo-E.com -- Resources for the Solo Entrepreneur Lifestyle
"..because it's not just about the business!"
Finalist for "Website of the Year" in 2007 Stevie(r) Awards for Women in Business


MikeB
Staff / Moderator


Apr 25, 2008, 10:07 AM

Post #20 of 20 (1525 views)
Shortcut
Re: [TerriZ] MORE... Re: [Jake] AM2 Virtual Search Results [In reply to] Can't Post

Hi Terri,

Thanks for the post!

While there may be a way to do this by tweaking this script or creating another script this is something that could take quite a bit of coding. The script above is provided as is, and will take any publishing rules that are enabled (in Admin->Publishing) and will just publish those.

If you have any other questions about this, just let me know!

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4