Label with hyperlink support Thread last updated on 2004-05-06 08:29:50

Posted by member 93741 on 2004-05-02 23:18:31

Hi,

I am fooling with an RSS Reader module that displays its information in a label of your choice. I was wondering if there are any label modules that support hyperlinks so I could display a news item, and open the article when you click on it. If not, any other ideas?

Thanks,
T.

Posted by member 144637 on 2004-05-03 01:03:38 link

Why not just put a simple:
*Script bang !ShowArticle
*Script exec !execute "$Browser$" "www.cnn.com"]
*Script ~bang

onLeftClick event to the label ???

Posted by member 93741 on 2004-05-03 09:06:10 link

That will work. I was just hoping I could have it go directly to that article when you clicked on it.

Thanks,
T.

Posted by member 144637 on 2004-05-03 21:16:43 link

Hmmmm.... Have you check to see if it can have an added anchor #tag.
For Instance http://www.cnn.com/news/articles.html#article1
If you dont know HTML, then read up on setting anchor tags. Since I know that the previous post worked.... I dont see why this wont work. Its still a valid html address.

This is what you would do.
A NAME="top" (surrounded with the normal lessthan and greaterthan signs from HTML)

this goes on the html page where you want the link to point to. TOP would be changed out with what you want. You can have numerous of these on one html page.
Then you would just use the html page address that has your news such as http://www.cnn.com/news.html , then just add # followed by the that you put in earlier.

Hope it works :)

Posted by member 1949 on 2004-05-03 22:36:13 link

Posted by member 35 on 2004-05-04 05:03:31 link

try lssyndication

Posted by member 111 on 2004-05-04 09:04:05 link

only maniac can catch a maniac:

rss.rc
;===============================================
; RSS news feeds (RSSReader v1.0)
;-----------------------------------------------

;======================
*RSSimport RSS
;----------------------

RSSURL http://www.shellfront.org/shellfront.xml
;RSSURL http://localhost/rss.php

RSS_Link "about:Not_available_yet"

RSSItemCount 10
RSSUpdateInterval 10
RSSInfoString \n^@Description^\n(^@Link^)
RSSItemString ^@Title^
RSSItemSeparator \n
RSSEnabled true

RSSInfoLabel RSSLabelTitle
RSSItemLabel RSSLabelItems
RSSOnUpdated !Execute [!LabelShow RSSLabelTitle][!ShowRSSItems][!RSSDisable RSS]
RSSOnFailure !RSSSetUpdateInterval RSS 10
RSSLocalFile "$MiscDir$rss.xml"
RSSOnNewsUpdated !alert IDDQD!

;======================
*Label RSSLabelTitle
;----------------------
RSSLabelTitleX -300
RSSLabelTitleY 50
RSSLabelTitleWidth 224
RSSLabelTitleHeight 84
RSSLabelTitleText "Here would be the title"
RSSLabelTitleImage rss_head.png
RSSLabelTitleImageMode stretch
RSSLabelTitleStartHidden
RSSLabelTitleOnLeftClick !ParseEvars "%#RSS_Link%#"
RSSLabelTitleFontHeight 18
RSSLabelTitleFontBold

;======================
;Label Group: RSSItems
;----------------------
RSSItemsX -300
RSSItemsWidth 224
RSSItemsHeight 20
RSSItemsText ""
RSSItemsImage rss_item.png
RSSItemsImageMode stretch
RSSItemsLeftBorder 5
RSSItemsRightBorder 5
RSSItemsAutoLineBreak false
RSSItemsAlign left
RSSItemsVertAlign center
RSSItemsStartHidden

;======================
*Label RSSLabelItem0
*Label RSSLabelItem1
*Label RSSLabelItem2
*Label RSSLabelItem3
*Label RSSLabelItem4
*Label RSSLabelItem5
*Label RSSLabelItem6
*Label RSSLabelItem7
*Label RSSLabelItem8
*Label RSSLabelItem9
;----------------------

RSSItemsLabelOffsetX 135

RSSLabelItem0Y $RSSItemsLabelOffsetX$
RSSLabelItem1Y $RSSItemsLabelOffsetX+RSSItemsHeight$
RSSLabelItem2Y $RSSItemsLabelOffsetX+2*RSSItemsHeight$
RSSLabelItem3Y $RSSItemsLabelOffsetX+3*RSSItemsHeight$
RSSLabelItem4Y $RSSItemsLabelOffsetX+4*RSSItemsHeight$
RSSLabelItem5Y $RSSItemsLabelOffsetX+5*RSSItemsHeight$
RSSLabelItem6Y $RSSItemsLabelOffsetX+6*RSSItemsHeight$
RSSLabelItem7Y $RSSItemsLabelOffsetX+7*RSSItemsHeight$
RSSLabelItem8Y $RSSItemsLabelOffsetX+8*RSSItemsHeight$
RSSLabelItem9Y $RSSItemsLabelOffsetX+9*RSSItemsHeight$

RSSLabelItem0OnLeftClick !ParseEvars "%#RSS_Item1_Link%#"
RSSLabelItem1OnLeftClick !ParseEvars "%#RSS_Item2_Link%#"
RSSLabelItem2OnLeftClick !ParseEvars "%#RSS_Item3_Link%#"
RSSLabelItem3OnLeftClick !ParseEvars "%#RSS_Item4_Link%#"
RSSLabelItem4OnLeftClick !ParseEvars "%#RSS_Item5_Link%#"
RSSLabelItem5OnLeftClick !ParseEvars "%#RSS_Item6_Link%#"
RSSLabelItem6OnLeftClick !ParseEvars "%#RSS_Item7_Link%#"
RSSLabelItem7OnLeftClick !ParseEvars "%#RSS_Item8_Link%#"
RSSLabelItem8OnLeftClick !ParseEvars "%#RSS_Item9_Link%#"
RSSLabelItem9OnLeftClick !ParseEvars "%#RSS_Item10_Link%#"

RSSLabelItem0AddToGroup RSSItems
RSSLabelItem1AddToGroup RSSItems
RSSLabelItem2AddToGroup RSSItems
RSSLabelItem3AddToGroup RSSItems
RSSLabelItem4AddToGroup RSSItems
RSSLabelItem5AddToGroup RSSItems
RSSLabelItem6AddToGroup RSSItems
RSSLabelItem7AddToGroup RSSItems
RSSLabelItem8AddToGroup RSSItems
RSSLabelItem9AddToGroup RSSItems


scripts.rc
mzScriptUseStep

*Script bang !ShowRSSItems
*Script exec !LabelShow RSSLabelItem0
*Script exec !LabelShow RSSLabelItem1
*Script exec !LabelShow RSSLabelItem2
*Script exec !LabelShow RSSLabelItem3
*Script exec !LabelShow RSSLabelItem4
*Script exec !LabelShow RSSLabelItem5
*Script exec !LabelShow RSSLabelItem6
*Script exec !LabelShow RSSLabelItem7
*Script exec !LabelShow RSSLabelItem8
*Script exec !LabelShow RSSLabelItem9
*Script exec !ParseEvars !LabelSetText RSSLabelItem0 "%#RSS_Item1_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem1 "%#RSS_Item2_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem2 "%#RSS_Item3_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem3 "%#RSS_Item4_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem4 "%#RSS_Item5_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem5 "%#RSS_Item6_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem6 "%#RSS_Item7_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem7 "%#RSS_Item8_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem8 "%#RSS_Item9_Title%#"
*Script exec !ParseEvars !LabelSetText RSSLabelItem9 "%#RSS_Item10_Title%#"
*Script ~bang



theme.rc:
*NetLoadModule mzscript-0.9-beta_12
*NetLoadModule xLabelLight-2.9
*NetLoadModule RSSReader-1.1

include "$ConfigDir$rss.rc"
include "$ConfigDir$scripts.rc"


also if you want to see standard "hand" cursor, use the latest xLabel and Cursor property.
or if you want to have on-hover text change like usual internet links provides, bind !LabelRefresh bang to RSSItemsOnEnter...

Posted by member 111 on 2004-05-04 09:05:52 link

but I'm recommend to try LSSyndication first ;)

Posted by member 93741 on 2004-05-06 08:29:50 link

Thank you all for your ideas! I will look into LSSyndication and if that doesn't suit my needs I'll check out Hovernews.

Thanks again,
T.