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

Home: Discontinued Products: Article Manager 1:
Inserting Article Lists w/ PHP includes

 

 


Silvatti
User

Oct 2, 2006, 4:58 PM

Post #1 of 6 (1522 views)
Shortcut
Inserting Article Lists w/ PHP includes Can't Post

I can't tell you how many times I've edited this entry to reflect how much I'm learning; thanks for all the great help you guys have been providing your customers, taking time to answer all these repetitive questions. I understand it can feel like a pretty a thankless job on occasion. =]

Well, I'm designing my Index template to separate each Category Index page into three or four distinct sections (perhaps using tables or CSS "div" tags).
I then use "Summary Only" article entries to appear in the main section, which serves as some text welcoming the visitor to that category page, as well as adding main content pertinent to that category.

I also plan on having all "Full Article" links placed in a separate location on that page under a Recent Essays heading. Finally, all "Internet URL" linked articles will appear near the bottom under its own Additional Resources heading.

In order to do this, I've decided to try creating non-visible subcategories labeled "Essays" (cat=36), "Intro" (cat=38), and "Resources"(cat=37) under which FULL, SUMMARY ONLY, and LINK articles will be published, respectively.

I went ahead and published some "viewable" test articles for each hidden sub-category.

Now my only goal is to figure out how to display the article listings of each sub-category on the parent category page by way of PHP includes. I've searched these forums and so far have only been able to find "shtml" formatted includes, and pasting the url syntax from shtml to PHP doesn't seem to work as well as I'd hoped (I've found Ross's advice here). Instead of article lists appearing, I get the following PHP error:

Warning: main($../../cgi-bin/artman/exec/search.cgi?search=1&template=search/article_sections.html&cat=38$) [function.main]: failed to open stream: No such file or directory in /home/sharedin/public_html/Library/index_1.php on line 38

The URL used in the example above is relative to the /publish directory, but I'd still get PHP errors after trying absolute URLs and pathnames relative to root.

Any suggestions? =]

Additional Details:
I've set my /publish/ directory to be located here:
http://mysite.org/Library/publish/

Articles for this category are set to be located here:
http://mysite.org/Library/Content/

If there's a much better way to do this, please let me know! Smile


(This post was edited by Silvatti on Oct 5, 2006, 1:58 PM)


Silvatti
User

Oct 4, 2006, 2:47 AM

Post #2 of 6 (1468 views)
Shortcut
Re: [Silvatti] Inserting Article Lists w/ PHP includes [In reply to] Can't Post

Using the method I've suggested, I've figured out a work-around. But I've had to edit the following file:

/templates/headlines/default.html

...and modify it down to just its most basic elements (Rows & placeholders). Then I'd create dummy articles for experimentation. Along with my pre-designated location into which AM publishes these article entries, AM also uses the /templates/headlines/default.html to generate some cat_headlines_## files which then are placed in the /publish directory. I understand then that these cat_headlines_## files are to contain only raw headlines for just this purpose...

Once that was done, I'd insert PHP includes onto my category page... one for each section's corresponding cat_headlines_## file so that the appropriate content would appear.

My only problem with this is that this solution will require me to create separate templates in the /index directory for each category in the entire site, editing the PHP includes to correspond to that category's unique set of cat_headlines_## files. I'll also need to make sure that every category uses its own unique category template, or anytime I try to re-PUBLISH ALL in the SETUP OPTIONS, the default index template will overwrite every category, destroying hours worth of work. :P

I wonder if there's an easier way to do this... This work-around is functional, but it will be labor-intensive to reconstruct the entire site this way (I anticipate building up to over 100 different category indices in this manner). If not, I'll press on... just thought I'd ask. =)


(This post was edited by Silvatti on Oct 4, 2006, 2:50 AM)


ChetW
Staff


Oct 4, 2006, 11:43 AM

Post #3 of 6 (1460 views)
Shortcut
Re: [Silvatti] Inserting Article Lists w/ PHP includes [In reply to] Can't Post

Hi,

Thanks for the post!

I am not sure that understand correctly your goal, are you trying to set-up each subcategory for your website as follows:

- Sub-category summary (at the top of the page).

- In the main section sub-category related articles will be displayed (in summary format).

- Next a "Recent Essays" section will be displayed.

- Finally an "Additional Resources" link will be displayed.

Reading through your posts it also sounds like you would like to know the best possible way to have your main sub-category article summaries displayed on the page. :)

Does this sound like how you would like to have your Sub-catergories set-up? Once I have a better understanding of your needs I will be happy to help guide you in the best direction for setting this up. :)
Cheers,
Chet Woodside - 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.



Silvatti
User

Oct 4, 2006, 12:21 PM

Post #4 of 6 (1457 views)
Shortcut
Re: [ChetW] Inserting Article Lists w/ PHP includes [In reply to] Can't Post

 

I know, it's a bit complicated... a visual representation I could talk about might help clear things up. =]





Here is an example of my category index. I've edited the templates/index/default.html file to auto-generate index pages in this format.

First, I've divided the page into four "invisible" quadrants:

Quadrant 1 is where an AM-generated category listing is intended to appear. But notice that the category listing is not a global one --it's limited to that specific category being displayed (in this case, "History"). Note also that "history" is not among the options you can click on. Instead, it displays subcategories two levels deep from the present category being displayed (I talk about this little quirk in this post.

Quadrant 2 is where I'd like to display the latest headlines for this category, but only those that are "full article"-type entries.

In Quadrant 3, I want to be able to update this section's introductory text purely by way of displaying AM-generated "Summary" articles.

In Quadrant 4, I want to display only AM-generated "Link"-type articles for this category.

Ordinarily, I would have no problem if I wanted to display this category's headlines all together in one place on the page. I'd just insert a single PHP include pointing to the category's corresponding cat_headlines_## file. But this will not work if I want the output to be segregated on the page by Article Type.

My solution so far has been to create three pseudo-subcategories for HISTORY in AM --One entitled ESSAYS, another entitled RESOURCES, and another entitled SUMMARY. Then I'd create only "full articles" for ESSAYS, "Link articles" for RESOURCES, and "Summary only" articles for SUMMARY. Now these psuedo-subcategories have cat_headlines_## files associated with them, displaying my articles the way I want them to.

I'd then insert three PHP includes into my index template pointing to these cat_headlines_## files onto my HISTORY index page.

Functionally speaking, this works as a solution, but if I want to implement this effect for the rest of my site, I would have to create custom Index templates for every category on my site. I'd have to log into AM, and set the HISTORY category to use not the default.html index file, but a custom "history.html" template with those specific PHP includes. For the AMERICAN index category, I'd have to create an "american.html" index template with its unique cat_headlines_## file includes, and so on...

I guess I'm asking: is there an easier way to do this? :P


(This post was edited by Silvatti on Oct 4, 2006, 12:31 PM)


Silvatti
User

Oct 4, 2006, 1:23 PM

Post #5 of 6 (1447 views)
Shortcut
Re: [Silvatti] Inserting Article Lists w/ PHP includes [In reply to] Can't Post

Here's an idea:

Suppose there's a way to exclude certain categories from having its corresponding cat_headlines_## file from having an incrementing number appended to the end of it (in other words, an option to get rid of the ## in cat_headlines_##). Suppose further that I could custom-name this file like I could the Category filename. Then I could then rely on a single relative pathway for the three "cat_headlines" files (all of them named ESSAYS, RESOURCES, and SUMMARY) to use in the PHP includes.

Then I'd only need a single template to manage my categories! :D


(This post was edited by Silvatti on Oct 4, 2006, 1:24 PM)


Silvatti
User

Oct 5, 2006, 1:58 PM

Post #6 of 6 (1424 views)
Shortcut
Re: [ChetW] Inserting Article Lists w/ PHP includes [In reply to] Can't Post

After searching through forums and documentation, it seems what I'm asking for here may exceed what the current version of AM is designed to achieve; my "work-around" as it stands really clutters up my category drop-down menu when creating articles, but I don't know that I have any other alternative.... using hidden sub-categories seems to be the only way to go about displaying my articles by type (I suppose using a spare article field to make a drop-down selection menu might lead to something promising (?), but I wouldn't even know where to begin configuring that for the effect I'm looking for).

I can settle with my current setup as it is now, but what I'm really hoping for now is a resolution to my navigation scheme... If anyone can help me with that, I'd greatly appreciate it.

Thanks!


(This post was edited by Silvatti on Oct 5, 2006, 2:05 PM)

 
 
 


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