BlogHarbor Home Page
FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  UsergroupsRSS   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Display ALL articles
Goto page 1, 2  Next 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
John Nada
Guest





PostPosted: Sun Jan 16, 2005 12:05 pm    Post subject: Display ALL articles Reply with quote

Is there any way to create a display/list of ALL articles?
I like the exerpt type display that's generated by a search, and was hoping there was a way to search, then have the search generated exerpt display come up as usual, but with a listing of all articles.

Thanks
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Sun Jan 16, 2005 12:15 pm    Post subject: Re: Display ALL articles Reply with quote

It's not possible to customize the search results; the search feature will only return an automatically generated summary of an article and not the full text.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jn
Guest





PostPosted: Sun Jan 16, 2005 4:21 pm    Post subject: this Reply with quote

I don't want to customize the output or even display the full text.

What I really want is a link people can use that says
"ALL ARTICLES"
They push it and get a big long list.
I thought of search because I like that exerpted type display that search generates, but anything will do.
Just want a quick and dirty way for a surfer to look at a list of all articles.
Back to top
jn
Guest





PostPosted: Sun Jan 16, 2005 4:26 pm    Post subject: that Reply with quote

by long list, I mean of headers just like the search display.
All I want is a convenient way for outsiders to look at all the articles that have been posted.
A long list of article titles, like my display all in the dashboard.
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Sun Jan 16, 2005 5:23 pm    Post subject: Re: that Reply with quote

The short answer to your question is no, we don't have an easy way for you to do this.

The technique explained here used to allow you to create a list of the 50 most recent posts by doing this:

1) Create a Web Page type of post, this page will show you how.

2) Add some code to the content of that Web Page, use the code shown on the previous thread. Make sure to disable the Rich Text Editor before you paste the code into your page: disable the Rich Text Editor by accessing your control panel from Settings & Security > Advanced. Look for the checkbox for Enable Rich Text Editor and uncheck it, then click Save Settings.

3) Link to your Web Page, maybe via a Favorites list or some other custom component.

Recently though, we decreased the number of items returned in that loop from 50 to 10 in order to decrease the amount that any given page could use system resources, so this technique is not as useful as it was before. I'll look into upping the limit to make this more useful again.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jn
Guest





PostPosted: Sun Jan 16, 2005 8:26 pm    Post subject: list all Reply with quote

John, ya know, simply having a word in every article that only you would use would solve the problem, like, end every article with:

---
foo

Then a search for "foo" would result in a results page showing every article by date. The pain would be going back into all the articles and adding the word.

Is there any way to edit and upload article (I could change them all here with my own editor easily and re-upload them)
Or any other way to mass add a keyword to old articles?

Bummer to go back in and change them all just for this.
New ones though...
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Mon Jan 17, 2005 10:35 am    Post subject: Re: list all Reply with quote

There's no easy way to export and re-upload your articles, nor to mass add keywords to your articles.

That's an interesting workaround you propose, but you might want to look at your RSS feed and see if there's anything you can do with that. It can show as many as 99 of your most recent articles...

Maybe create a Web Page document and use a service like RSS-to-Javascript to embed the headlines into that Web Page...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jn
Guest





PostPosted: Mon Jan 17, 2005 7:51 pm    Post subject: all arts Reply with quote

<a href="http://www.tryontheglasses.com/blog?cmd=search&keywords=totglist"> Table of Contents </a>
Back to top
Guest






PostPosted: Mon Jan 17, 2005 7:52 pm    Post subject: Reply with quote

Ooops

http://www.tryontheglasses.com/blog?cmd=search&keywords=totglist

Table of contents using search
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Mon Jan 17, 2005 9:29 pm    Post subject: Reply with quote

Looks like you went in to all of your pages and added
Code:
<font color="white">[totglist]</font>
to them. This had the effect of tagging your pages with a certain phrase that would appear in all of them, so that a search would reveal all pages. When the pages are displayed standalone, the tag does not appear since the font color is white. Clever.

A purist would argue that you have dirtied your data, but I would say if it works for you, then that's all that matters...


Last edited by john on Mon Jan 17, 2005 9:51 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jn
Guest





PostPosted: Mon Jan 17, 2005 9:49 pm    Post subject: oh well Reply with quote

the purists can always design their own blogs. I'll take my muddied up version, thanks. smile.

I like that a lot and adding the tag to new posts keeps it up to date
It's the easiest most comprehensive article's listings I've seen and makes a good tool for users I think.

I'd really like to see a built in function that allows blogharbor bloggers to get the same type of comprehensive list with a system function in the future.

I bet the readers would appreciate it.
Back to top
cr
Guest





PostPosted: Thu Jan 27, 2005 8:26 pm    Post subject: table of contents Reply with quote

jn, great site, i have read it often. another workaround to this would be to add a specific keyword to every article that you post, for instance the keyword "totgabc". then you can edit the article template to hide the keywords:


Code:
<!--{{if keywords}}
<div style="margin-top:8px;margin-bottom:25px;">
<strong>Keywords:</strong>&nbsp;
{{loop keywords}}
<a href="{{search_url}}">{{var name=keyword escape=html}}</a>{{unless __last__}}, {{/unless}}
{{/loop}}
</div>
{{/if}}-->


this way when a search is done the results will still be displayed although there will be no visible word in your articles. this technique can also be used to display different themes of results if you use multiple keywords in the articles. you can get more creative this way, but its just an idea. either way it still would mean changing all articles, but it looks like you already did that Smile
Back to top
jn
Guest





PostPosted: Tue Feb 01, 2005 4:58 pm    Post subject: Thanks Reply with quote

Thanks for mentioning that.
Yeah, I'm not changing em again though. Smile...

If you liked totg
Check out http://www.tryontheglasses.net forum I'm starting separate from but attached to the blog.
Back to top
abacquer



Joined: 22 Mar 2004
Posts: 193

PostPosted: Sun Feb 06, 2005 8:38 am    Post subject: Usign Search to get a Table of Contents Reply with quote

Unfortunately the ordering of search results is something of a mystery. It's not by date, it's not by alphabet, so a grand index it ain't.

You could certainly build your own index page and just upload that and link to it. This would have the added benefit of allowing you to exclude articles which you posted in a spare moment like "can't post today but check back tomorrow" or whatever.

Or you could do what a lot of people do and create a "Favorite Posts" component for your sidebar which lists the articles on your blog that you are most proud of.

Quote:
If you liked totg check out ...


Unlikely. I'm a liberal.
_________________
-- Abacquer, A.K.A. Chuck Seggelin
Back to top
View user's profile Send private message Send e-mail Visit poster's website
abacquer



Joined: 22 Mar 2004
Posts: 193

PostPosted: Sun Feb 06, 2005 11:44 am    Post subject: Re: Usign Search to get a Table of Contents Reply with quote

abacquer wrote:
...You could certainly build your own index page and just upload that and link to it...


Okay, here's a way to do just that. These instructions assume you have access to semi recent versions of MS Word, and MS Excel, but even if you don't you should be able to come with something based on this.

Quote:
  1. Fire up MS Word.

  2. Go to your BlogHarbor "Post Manager". Set number of articles to 100 per page.

  3. Choose a category (Main Page, for example).

  4. Cycle through all the pages of the listing, and for each page:
    1. View the HTML source.
    2. In the source, find the "list of articles" table. (search on class="list", that will take you right there)
    3. Copy the rows of the list table
    4. Go to MS Word, paste the rows as text
  5. Now you've got all the rows in a text document.

  6. Find and replace all < with ~~~. (We'll change it back later, this is just to prevent "smart" Microsoft applications from trying to dork with our HTML as we paste it around.)

  7. Find and replace all carriage returns with "". In word you search on ^p. This will cause all the lines of HTML to be attached end to end in one big line.

  8. Find and replace all ~~~tr with ^p~~~tr. (i.e. insert carriage returns before each row, so that each row is on its own line.)

  9. Find and replace all ~~~td with ^t~~~td. (i.e. insert a TAB before every table cell)

  10. Copy all the text and paste it into MS Excel. Excel will split the lines into columns wherever you placed a TAB. If you did this right, there should be one row in the spreadsheet for each article in the list. Columns A-F should the following data in them:
    1. The TR tag: ~~~tr class="odd">
    2. The edit article link/Title: ~~~td>~~~a href="/admin/index.cgi/cmd=edit_article/id=303956">Reuphotoholstery~~~/a>&nbsp;~~~/td>
    3. The article type (article/photo): ~~~td nowrap>Article&nbsp;~~~/td>
    4. The article state (publish/draft): ~~~td nowrap>Publish&nbsp;~~~/td>
    5. The article date: ~~~td nowrap>2005.02.05 12:25PM EST&nbsp;~~~/td>
    6. The "delete" checkbox and row closer: ~~~td align="center" nowrap>~~~input type="checkbox" name="article_id*" value="303956" class="checkbox" title="Click to delete this article">~~~/td>~~~/tr>
  11. We don't need the type or state columns, so you can delete them. Delete columns C and D (causing columns E and F to become C and D). NOTE: If you have a mix of types or states and you want to exclude some (for example, unpublished articles) you may want to first sort by these columns and delete the rows you wish to exclude.

  12. Now we can start building a new table. The problem is that the links in here are all EDIT links and we need to make them into actual links to the article. To do that we MUST get the article ID out. There are a number of different ways to do this, but here is what I did:
    1. Select column D.
    2. Choose Tools\Text to Columns.
    3. Choose "delimited" and click next.
    4. Uncheck "Tab", and check "Other:". In the box next to "Other:" enter the following text: "
    5. Click finish
    6. This breaks column D out into multiple columns using the "'s as delimiters, one of the columns will contain the article id. For me it is column K, and columns D-J and L-P contain other text from the line that we will not need. Delete these extra columns so that you have the 3 columns we haven't touched yet, and a column (D) containing the id.
  13. Now we need to pull out the article title. We'll put it in column E. Here's the formula to put in cell E1 and then fill down:
    Code:
    =MID(B1,FIND(""">",B1)+2,FIND("~~~/a>",B1)-FIND(""">",B1)-2)

  14. The last thing to pull out is the date, now you may not actually want to display the date on your "grand index" but you do need the date to build the article URL. Let's put the date in column F. Here's the formula for cell F1 (remember to fill down):
    Code:
    =MID(C1,FIND(">",C1)+1,FIND("&",C1)-FIND(">",C1)-1)

  15. Now columns D, E, F contain all the raw data we need to build a new table. We can't delete columns A,B,C because they are our source data, but for now let's hide them because we don't need to look at them anymore. Select columns A, B, and C and choose Format\Column\Hide.

  16. Okay, first thing we need is a row opener. The one Blogharbor provides is a good one because it has "odd" and "even" classes on it which you can use to have alternating colored rows, or ignore if you want all rows to look the same. Lets put the row opener in column H. Put this is in cell H1 and fill down:
    Code:
    =SUBSTITUTE(A1,"~~~","<")

  17. Now the date column, if you want to exclude this just ignore this. Put this in cell I1 and fill down:
    Code:
    ="<td nowrap>" & F1 & "</td>"

  18. Now for the article link column. The article permanent URL looks like this: http://{YOUR_BLOG_NAME_WITH_NO_SPACES_IN_LOWERCASE}.blogharbor.com/blog/_archives/{year}/{month}/{day}/{article_id}.html. The year month and day we need to pull out of the date (carefully, they ignore the leading zeros on MM and DD in the url), and we have the article id already. I don't know what your blog name is, so I'll use mine for the purposes of this example: "Unbecoming Levity" (which appears as "unbecominglevity" for the URL). Okay, here's the formula to put in cell J1 and then fill down:
    Code:
    ="<td valign=top><a href=""http://unbecominglevity.blogharbor.com/blog/_archives/" & LEFT(F1,4) & "/" & VALUE(MID(F1,6,2)) & "/" & VALUE(MID(F1,9,2)) & "/" & D1 & ".html"" target=_BLANK>" & E1 & "</a></td>"
    NOTE: in 2005 this doesn't work anymore, see bottom of article for corrected formula.
  19. Add the row closer in column K, and fill down:
    Code:
    ="</tr>"

  20. Now copy columns H-K and paste them into a text document in notepad. Your notepad doc will look something like this (you'll note tabs between the tags, it's harmless but feel free to Search&Replace it away):
    Code:
    <tr class="odd">   <td nowrap>2005.02.05 12:25PM EST</td>   <td valign=top><a href="http://unbecominglevity.blogharbor.com/blog/_archives/2005/2/5/303956.html" target=_BLANK>Reuphotoholstery</a></td>   </tr>
    <tr class="even">   <td nowrap>2005.02.05 10:56AM EST</td>   <td valign=top><a href="http://unbecominglevity.blogharbor.com/blog/_archives/2005/2/5/303876.html" target=_BLANK>Fortress of Solitude</a></td>   </tr>
    <tr class="odd">   <td nowrap>2005.02.04 02:54AM EST</td>   <td valign=top><a href="http://unbecominglevity.blogharbor.com/blog/_archives/2005/2/4/302469.html" target=_BLANK>Cracking the Twenty Five Cent Code</a></td>   </tr>
    .
    .
    .

  21. Add a table header before the rows:
    Code:
    <table border=0 cellpadding=1 cellspacing><tr><th>Date</th><th width=320>Article</th></tr>

  22. Add a table closer after the rows:
    Code:
    </table>

  23. Now grab your table and paste it into an HTML document, upload it to your blogharbor webspace, and link to it from your blog. Here's an example from my blog, it's not ALL my articles, just the month of January.

  24. The page will not auto update of course, so if you delete an article, you'll have a dead reference to it on your index, and of course on a monthly/quarterly/yearly basis or so, you will want to grab new table rows from your Post Manager, process them and add them to your index.


An enterprising person could probably throw together a macro, vb app, or javascript function to do the same thing.

EDIT: Note that in 2005, due to a change in how BlogHarbor displays the Date Format. Step 18 above no longer works. You'll need to replace the formula there with this one:
Code:
="<td valign=top><a href=""http://unbecominglevity.blogharbor.com/blog/_archives/" & MID(F1,12,4) & "/" & (((FIND(MID(F1,8,3),"JanFebMarAprMayJunJulAugSepOctNovDec")-1)/3)+1) & "/" & VALUE(MID(F1,5,2)) & "/" & D1 & ".html"" target=_BLANK>" & E1 & "</a></td>"

And everything should be happy again.
_________________
-- Abacquer, A.K.A. Chuck Seggelin


Last edited by abacquer on Wed Feb 01, 2006 12:49 pm; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Search all BlogHarbor support resources.
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Tips and Tricks All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum