Steinar Svendsen Registered Users
 Ventrian Active Member Posts:49

 |
| 3/29/2006 2:09 AM |
|
Posted By Bonavox on 3/29/2006 1:57 AM Instead of [PRINT] I add the following to the View.Item.html PrintI could not find a [TABID] tokens, that should be easy to implement  /Steinar
Right... I see HTML works as designed 
I try again... to enable print in articles, add this somewhere in the View.Item.html (try adding a TD just before HASLINK).
<tr> <td align=right> <span class="Normal"><a href="?tabid=172&mid=[MODULEID]&articleId=[ARTICLEID]&articleType=ArticleView&dnnprintmode=true&SkinSrc=%5bG%5dSkins%2f_default%2fNo+Skin&ContainerSrc=%5bG%5dContainers%2f_default%2fNo+Container" target="_blank">Skriv uta>span> td> tr>
Remember to change the TABID to reflect where you got your NewsArticles module. Of course, this dont work if you have several different NewsArticles modules on your portal using the same template.
To correct this, apply for a [TABID] token from the author.
/Steinar
|
|
|
|
|
Scott McCulloch Administrators
 Ventrian Master Posts:17204


 |
| 4/03/2006 5:39 AM |
|
| I've added the [TABID] in the latest release. |
|
Scott McCulloch Site Administrator |
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/20/2006 3:12 PM |
|
I have had several request to provide article print from my users. I've entered the exact code suggested: "?tabid=[TABID]&mid=[MODULEID]&articleId=[ARTICLEID]&articleType=ArticleView&dnnprintmode=true&SkinSrc=%5bG%5dSkins%2f_default%2fNo+Skin&ContainerSrc=%5bG%5dContainers%2f_default%2fNo+Container" target="_blank"
But I get this error:
Input string was not in a correct format.
Line 117: ' get TabId from querystring ( this is mandatory for maintaining portal context for child portals ) Line 118: If Not (Request.QueryString("tabid" Is Nothing) Then Line 119: TabId = Int32.Parse(Request.QueryString("tabid" ) Line 120: End If Line 121: ' get PortalId from querystring ( this is used for host menu options as well as child portal navigation )
Source File: C:\Inetpub\Dev\Net\DNN\Solution\DNN\HttpModules\UrlRewrite\UrlRewriteModule.vb Line: 119
[TABID] is returning correctly: 58
I get this problem if I use [TABID] or just hard code 58.
I don't get this error if I clip out "tabid=58&". I get a popup with plain formatting - but of the top level Current Articles listing.
Im running 5.24 on DNN 3.2.2
Any suggestions?
Thanks, Wylie
|
|
|
|
|
Scott McCulloch Administrators
 Ventrian Master Posts:17204


 |
| 4/20/2006 7:17 PM |
|
Hmm, that's odd, it works on my local DNN install using something like:-
/Default.aspx?tabid=52&mid=364&SkinSrc=%5bG%5dSkins%2f_default%2fNo+Skin&ContainerSrc=%5bG%5dContainers%2f_default%2fNo+Container&dnnprintmode=true[b]&articleType=ArticleView&articleId=34 [/b]
What version of DNN are you using? It sounds like the [TABID] isn't being returend as a valid integer, but from your post it seems it is.
Is your site online? |
|
Scott McCulloch Site Administrator |
|
|
Scott McCulloch Administrators
 Ventrian Master Posts:17204


 |
| 4/20/2006 7:19 PM |
|
I also got it to display ok on this site:-
http://www.ventrian.com/Resources/Articles/tabid/213/mid/363/dnnprintmode/true/Default.aspx?SkinSrc=%5bG%5dSkins%2f_default%2fNo+Skin&ContainerSrc=%5bG%5dContainers%2f_default%2fNo+Container&articleType=ArticleView&articleID=261 |
|
Scott McCulloch Site Administrator |
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/20/2006 9:43 PM |
|
Hi Scott,
I'm running 5.24 on DNN 3.2.2
My URL are formed different from yours. I followed the suggested method above.
Here's an article. You'll find the Print link in the bottom left: http://uvidaho.org/News/NewsArticles/tabid/275/articleType/ArticleView/articleId/689/Property-Taxes-The-Homeowners-Exemption.aspx
Wylie
|
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/20/2006 9:59 PM |
|
Hi Again,
I got it working. I needed to add "/Default.aspx" to the front of the string provided above. Now all is well.
Thanks for checking in.
Wylie |
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/21/2006 1:48 AM |
|
Here's a nice way to get really clean print output. I use a print style to drop out what I don't want - like the menu links at top and the comments at bottom.
I've attached a template that demonstrates. I also have made a few edits to some .ascx files that you might want to try out. You'll need to supply the classes.
Can anyone think of a generic way to pull in the skin.css so that my text retains it's style?
Thanks, Wylie |
Attachment: KeepItSimple.zip
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/21/2006 3:02 AM |
|
So that my text can retain its style during printing I took some of my main styles, set them to work with grey tones for printers, and placed them in the News Article module.css. These will get overwriten if the skin.css and container.css are present. Otherwise I have decent formating, for any of my portals, when I print.
Thanks for the company gents.
Good night. Wylie |
|
|
|
|
Scott McCulloch Administrators
 Ventrian Master Posts:17204


 |
| 4/21/2006 6:03 AM |
|
| Looks great Wylie, I'm wondering if I should add a [PRINT] token that links to what you have achieved. |
|
Scott McCulloch Site Administrator |
|
|
John L. Gold Membership
 Ventrian Addict Posts:71


 |
| 4/21/2006 6:10 AM |
|
| A [PRINT] token would be great! |
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/21/2006 10:47 AM |
|
A link token would be good. It's the most requested feature from my client's. Second is the ability to open external URLs in the "Read more..." link into a "New Window".
BTW - change the Style definition in the top of view.Item.html to
There are two "hard coded" aspects of this solution. One is that I could not get the width to be 100%, so I had to assume a printer paper width of 8.5 inches then hard code the sytle width to 7.5.
The otherl thing you'll have to take care of (that can be programmatically addressed) is DNN installs in virtual directories. For some reason "?tabid=[TABID]..." did not work for me, so I had to put in "/Default.aspx?tabid=[TABID]..." . This, of course, will not work when your install is in a virutal directory like http://localhost/dnn. So this represents a "hard coded" aspect of the solution. In code your could set this properly.
Did you noitice the changes to the two ucXXX.ascx files? It would be nice if these were added to the templates also. Here a few example of the "keep it simple" skin in action - with Print icon down below. Try out just Print Preview if you want. FireFox gives the best results. http://uvidaho.org/News/NewsArticles/tabid/275/articleType/ArticleView/articleId/556/Redistricting-Shenanegans.aspx http://jimhansenforidaho.com/News/Articles/tabid/516/articleType/ArticleView/articleId/507/Jim-Hansen-Shares-His-Commitment-for-Reform.aspx http://idahononprofits.org/News/NewsArticles/tabid/616/articleType/ArticleView/articleId/376/Default.aspx
They are all using the same template and ucXXX.ascx files hosted on the same DNN codebase. You'll notice that the Print Preview pages have the same CSS because they are pulling them from the defaults in the module.css since the skin.css and container.css are out of the picture. The last one demonstrates how comments get dropped out too.
A remaining "nice touch" would be if you could programmatically expose all anchor tags so they show "link text [actual URL]"
Thanks for a fabulous product Scott.
BTW - have you seen my "affiniity group" setup? All the "Hot Issues" on this site are setup that way: http://uvidaho.org For News Articles I have created a new Template (which I still have to update with the Print feature). For the Forums I worked with Will and he released a new companion module called Forum View.
I did notice a small bug with News Articles. When I tried to create new articles from the affinity group interface, viewing the article from the main news section (under the News tab) would vector the viewer out to the respective Affinity page. So I dropped all create features from the Menu.Item.Html for the template I use here. Along with the Search and Categories links because they showed all options. It would be nice to get the "search" option restored so that it will only "search" on the categories checked in the admin options. Perhaps Categories and Syndicate should work like this also. Let me know if you want any user testing on these items.
Thanks again, Wylie
|
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/21/2006 1:30 PM |
|
One final thought about the ucCategoryView.ascx and the ucNewsListing.ascx files that I have edited and are in the above zip.
It would be nice if both of these were moved to a single Category.Header.html template. It could have a [CATEGORY] token to do the layout/CSS work on. In this case "Current Articles" would need to be handled as one of the categories.
It would also be nice if you could rename this "root category" in the Admin options. That way people could rename it to "current listings" or "latest offers" etc. Presently "current articles" is the only real hard coded aspect of this module's UI. |
|
|
|
|
Chris Wylie Gold Membership
 Ventrian Addict Posts:99


 |
| 4/21/2006 1:37 PM |
|
Here is the final "Keep It Simple" template with the Print feature added and the CSS tuned up. Please be sure to read the previous half dozen postings for any caveats.
Enjoy, Wylie |
Attachment: KeepItSimple.zip
|
|
|
|
Dhiraj Gupta Registered Users
 Ventrian Newbie Posts:7

 |
| 5/03/2006 2:55 PM |
|
Any way to have the post comment form appear directly on the display page of the article?
Basically... I'd like to have the post comments form to appear below the comments section of my blog.
Having it as an extra click (from the comments footer html file via the [POSTCOMMENT] token) kind of dissuades visitors from posting comments. 
-Dhiraj. |
|
|
|
|
Steinar Svendsen Registered Users
 Ventrian Active Member Posts:49

 |
| 5/16/2006 4:02 AM |
|
| The [PRINT] token also prints out my "sticky" modules that I have on every page. |
|
|
|
|
Steinar Svendsen Registered Users
 Ventrian Active Member Posts:49

 |
| 5/16/2006 4:06 AM |
|
And it prints out the [PRINT] token  |
|
|
|
|
Scott McCulloch Administrators
 Ventrian Master Posts:17204


 |
| 5/16/2006 6:58 AM |
|
| You mean it prints out the other modules on the page? Do you have a screenshot? |
|
Scott McCulloch Site Administrator |
|
|
Steinar Svendsen Registered Users
 Ventrian Active Member Posts:49

 |
| 5/16/2006 7:10 AM |
|
Yes 
Here is a screenshot of the printer image http://www.safetel.com/temp/screen_printtoken_01.jpg
"Skriv ut" means "Print". A better token than [PRINT] would be [PRINTLINK]. That way I can align the image correctly, use a different image, different title etc.
Here is a screenshot of the printed page http://www.safetel.com/temp/screen_printtoken_02.jpg
The red text (a picture) is your LatesArticles showing just an [IMAGELINK] in a table, its a reference list. Above it you can see the print token. |
|
|
|
|
Steinar Svendsen Registered Users
 Ventrian Active Member Posts:49

 |
| 5/16/2006 7:14 AM |
|
Is it possible to make a [HASIMAGE]? The [IMAGELINK] is often used together with and that tag do display even if no image selected = empty picture holder  |
|
|
|
|