View previous topic :: View next topic |
Author |
Message |
John Nada Guest
|
Posted: Sun Jan 16, 2005 12:05 pm Post subject: Display ALL articles |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
john Site Admin
Joined: 16 Mar 2004 Posts: 3434
|
Posted: Sun Jan 16, 2005 12:15 pm Post subject: Re: Display ALL articles |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Sun Jan 16, 2005 4:21 pm Post subject: this |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Sun Jan 16, 2005 4:26 pm Post subject: that |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
john Site Admin
Joined: 16 Mar 2004 Posts: 3434
|
Posted: Sun Jan 16, 2005 5:23 pm Post subject: Re: that |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Sun Jan 16, 2005 8:26 pm Post subject: list all |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
john Site Admin
Joined: 16 Mar 2004 Posts: 3434
|
Posted: Mon Jan 17, 2005 10:35 am Post subject: Re: list all |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Mon Jan 17, 2005 7:51 pm Post subject: all arts |
|
|
<a href="http://www.tryontheglasses.com/blog?cmd=search&keywords=totglist"> Table of Contents </a> |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
john Site Admin
Joined: 16 Mar 2004 Posts: 3434
|
Posted: Mon Jan 17, 2005 9:29 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Mon Jan 17, 2005 9:49 pm Post subject: oh well |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
cr Guest
|
Posted: Thu Jan 27, 2005 8:26 pm Post subject: table of contents |
|
|
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>
{{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](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jn Guest
|
Posted: Tue Feb 01, 2005 4:58 pm Post subject: Thanks |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
abacquer
Joined: 22 Mar 2004 Posts: 193
|
Posted: Sun Feb 06, 2005 8:38 am Post subject: Usign Search to get a Table of Contents |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
abacquer
Joined: 22 Mar 2004 Posts: 193
|
Posted: Sun Feb 06, 2005 11:44 am Post subject: Re: Usign Search to get a Table of Contents |
|
|
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: | - Fire up MS Word.
- Go to your BlogHarbor "Post Manager". Set number of articles to 100 per page.
- Choose a category (Main Page, for example).
- Cycle through all the pages of the listing, and for each page:
- View the HTML source.
- In the source, find the "list of articles" table. (search on class="list", that will take you right there)
- Copy the rows of the list table
- Go to MS Word, paste the rows as text
- Now you've got all the rows in a text document.
- 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.)
- 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.
- 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.)
- Find and replace all ~~~td with ^t~~~td. (i.e. insert a TAB before every table cell)
- 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:
- The TR tag: ~~~tr class="odd">
- The edit article link/Title: ~~~td>~~~a href="/admin/index.cgi/cmd=edit_article/id=303956">Reuphotoholstery~~~/a> ~~~/td>
- The article type (article/photo): ~~~td nowrap>Article ~~~/td>
- The article state (publish/draft): ~~~td nowrap>Publish ~~~/td>
- The article date: ~~~td nowrap>2005.02.05 12:25PM EST ~~~/td>
- 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>
- 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.
- 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:
- Select column D.
- Choose Tools\Text to Columns.
- Choose "delimited" and click next.
- Uncheck "Tab", and check "Other:". In the box next to "Other:" enter the following text: "
- Click finish
- 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.
- 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) |
- 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) |
- 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.
- 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,"~~~","<") |
- 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>" |
- 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.
- Add the row closer in column K, and fill down:
- 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>
.
.
. |
- Add a table header before the rows:
Code: | <table border=0 cellpadding=1 cellspacing><tr><th>Date</th><th width=320>Article</th></tr> |
- Add a table closer after the rows:
- 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.
- 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 |
|
![](templates/subSilver/images/spacer.gif) |
Search all BlogHarbor support resources.
|
View previous topic :: View next topic |
|
|
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
|
|