- Timestamp:
- 2013-03-28T17:46:57+13:00 (11 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/collect/demo/macros/extra.dm
r27099 r27150 1 package about 2 3 _pagescriptextra_ { 4 _rssscript_ 5 } 6 _pagefooterextra_ { 1 package Global 2 _optrsslink_ { 7 3 _rsslink_ 8 4 } 9 -
main/trunk/greenstone2/macros/base.dm
r27099 r27150 423 423 424 424 425 # RSS link and default RSS icon for embedding in the link426 # RSS icon from http://webneel.com/post/freedownload/web-design/icon-design/25-web-rss-icons427 428 _rssicon_ {<img class="icon" src="_httpimages_/rssicon.png" alt="_collectionname_ RSS feed" title="_collectionname_ RSS feed" onLoad="addDomainToRSSAnchor(this)">}429 430 _rsslink_ {<a id="rss" href="_gwcgi_?site=localhost&a=rss&c=_cgiargc_&l=_cgiargl_&w=_cgiargw_">_rssicon_</a>}431 # e.g. rss link: http://localhost:8283/greenstone/cgi-bin/library.cgi?site=localhost&a=rss&c=demo&l=en&w=utf-8&hostname=localhost:8283432 433 425 ########################################################################### 434 426 # Metadata formatting stuff -
main/trunk/greenstone2/macros/nav_css.dm
r23519 r27150 14 14 ####################################################################### 15 15 16 _globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink__optloginlink_ }16 _globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink__optloginlink_ _optrsslink_} 17 17 _homelink_ {_navtaborig_(_httppagehome_,_linktextHOME_,_textdescrhome_)} 18 18 _helplink_ {_navtaborig_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)} … … 36 36 </script> 37 37 ) 38 } 39 40 41 # if a collection should have an rss link, 42 # set _optrsslink_ for that collection's global package to contain _rsslink_ 43 _optrsslink_ {} 44 45 # RSS link and default RSS icon for embedding in the link 46 # RSS icon from http://webneel.com/post/freedownload/web-design/icon-design/25-web-rss-icons 47 # e.g. rss link: http://localhost:8283/greenstone/cgi-bin/library.cgi?site=localhost&a=rss&c=demo&l=en&w=utf-8&hostname=localhost:8283 48 # And the javascript that's used for appending "&hostname=host:port" to the link to the RSS feed 49 # The script is activated on loading the rss icon <img>, since onLoad doesn't work on <a> 50 # The rsslink that embeds rssicon are two macros defined in base.dm 51 # To use this script, define pagescriptextra macro to contain the domainscript macro 52 # Can do so at collectionlevel in a collection's extra.dm (try to add it to package about) 53 54 _rssicon_ {<img class="icon" src="_httpimages_/rssicon.png" alt="_collectionname_ RSS feed" title="_collectionname_ RSS feed" onLoad="addDomainToRSSAnchor(this)">} 55 56 _rsslink_ {<a id="rss" href="_gwcgi_?site=localhost&a=rss&c=_cgiargc_&l=_cgiargl_&w=_cgiargw_">_rssicon_</a> 57 <script type="text/javascript"> 58 function addDomainToRSSAnchor (imgtag) 59 \{ 60 parent = imgtag.parentNode; 61 if (parent && parent.href) 62 \{ 63 parent.href += "&hostname="+location.hostname; 64 if(location.port) \{ 65 parent.href += ":"+location.port; 66 \} 67 \} 68 \} 69 </script> 38 70 } 39 71 -
main/trunk/greenstone2/macros/style.dm
r27099 r27150 229 229 } 230 230 231 # Javascript that's used for appending "&hostname=host:port" to the link to the RSS feed232 # The script is activated on loading the rss icon <img>, since onLoad doesn't work on <a>233 # The rsslink that embeds rssicon are two macros defined in base.dm234 # To use this script, define pagescriptextra macro to contain the domainscript macro235 # Can do so at collectionlevel in a collection's extra.dm (try to add it to package about)236 237 _rssscript_ {238 function addDomainToRSSAnchor (imgtag)239 \{240 parent = imgtag.parentNode;241 if (parent && parent.href)242 \{243 parent.href += "&hostname="+location.hostname;244 if(location.port) \{245 parent.href += ":"+location.port;246 \}247 \}248 \}249 }250 231 251 232 # imagescript only used in nav_ns4.dm
Note:
See TracChangeset
for help on using the changeset viewer.