2002-07-01 16:36:27 +00:00
/ *
* macro for rendering a part of the content .
* /
function content _macro ( param ) {
2002-07-26 12:39:31 +00:00
// moved the check for old property layout to
// objectFunctions.js/getContentPart() because
// this function is called directly sometimes [ts]
2002-07-01 16:36:27 +00:00
if ( param . as == "editor" ) {
2002-07-26 12:44:25 +00:00
// this is a first trial to add a title like
// "Re: title of previous posting" to a new posting
2003-01-05 16:38:02 +00:00
// (works only if autoresponse="true" is set in the macro)
2003-02-04 12:19:50 +00:00
if ( param . autoresponse == "true" && param . part == "title" && ! this . content ) {
2002-07-26 13:32:22 +00:00
if ( path . comment && path . comment . title )
param . value = "Re: " + path . comment . title ;
else if ( path . story && path . story . title )
2002-07-26 12:39:31 +00:00
param . value = "Re: " + path . story . title ;
2002-08-21 16:10:08 +00:00
} else
2002-07-26 12:39:31 +00:00
param . value = this . getContentPart ( param . part ) ;
2003-01-05 16:38:02 +00:00
// if there's still no value get it from request.data if available:
if ( ! param . value && req . data [ param . part ] )
2003-01-05 16:59:58 +00:00
param . value = unescape ( req . data [ param . part ] ) ;
2002-07-26 13:21:50 +00:00
param . name = "content_" + param . part ;
2002-07-10 12:20:22 +00:00
delete ( param . part ) ;
2003-02-04 12:19:50 +00:00
if ( ! param . height || parseInt ( param . height , 10 ) == 1 )
2002-07-10 12:20:22 +00:00
renderInputText ( param ) ;
2003-02-04 12:19:50 +00:00
else
2002-07-10 12:20:22 +00:00
renderInputTextarea ( param ) ;
2002-07-19 14:58:59 +00:00
} else if ( param . as == "image" ) {
var part = this . getContentPart ( param . part ) ;
if ( part && this . site . images [ part ] ) {
delete ( param . part ) ;
renderImage ( this . site . images [ part ] , param ) ;
}
2002-08-01 20:00:53 +00:00
// see comment at the beginning of this function
// } else if (!this.content) {
// return;
2002-07-01 16:36:27 +00:00
} else {
var part = this . getRenderedContentPart ( param . part ) ;
if ( ! part && param . fallback )
part = this . getRenderedContentPart ( param . fallback ) ;
2002-09-20 16:11:17 +00:00
if ( param . as == "link" ) {
if ( this . _prototype != "comment" )
openLink ( this . href ( ) ) ;
else
openLink ( this . story . href ( ) + "#" + this . _id ) ;
2002-12-01 19:26:40 +00:00
if ( ! part && param . part == "title" ) {
part = this . getRenderedContentPart ( "text" ) ;
param . limit = "20" ;
}
2002-09-20 16:11:17 +00:00
}
2002-07-01 16:36:27 +00:00
if ( ! param . limit )
2002-10-15 18:08:41 +00:00
res . write ( part ) ;
2002-07-01 16:36:27 +00:00
else
2002-08-14 17:36:14 +00:00
res . write ( softwrap ( clipText ( part , param . limit , param . clipping ) ) ) ;
2002-07-01 16:36:27 +00:00
if ( param . as == "link" )
closeLink ( ) ;
}
}
2001-06-18 08:57:33 +00:00
/ * *
* macro rendering title of story
* /
function title _macro ( param ) {
2002-07-01 16:36:27 +00:00
param . part = "title" ;
this . content _macro ( param ) ;
2001-06-18 08:57:33 +00:00
}
/ * *
* macro rendering text of story
* /
function text _macro ( param ) {
2002-07-01 16:36:27 +00:00
param . part = "text" ;
this . content _macro ( param ) ;
2001-06-18 08:57:33 +00:00
}
/ * *
* macro rendering online - status of story
* /
function online _macro ( param ) {
2001-12-16 18:14:00 +00:00
if ( param . as == "editor" ) {
2002-01-05 02:33:50 +00:00
var options = new Array ( "offline" , "online in topic" , "online in weblog" ) ;
2002-06-03 16:56:14 +00:00
renderDropDownBox ( "online" , options , this . online ) ;
2001-12-16 18:14:00 +00:00
} else {
2002-12-01 19:26:40 +00:00
if ( ! this . online )
2001-12-16 18:14:00 +00:00
res . write ( "offline" ) ;
2002-12-01 19:26:40 +00:00
else if ( this . online < 2 ) {
2001-12-16 18:14:00 +00:00
res . write ( "online in " ) ;
2002-06-26 16:35:28 +00:00
openLink ( this . site . topics . get ( this . topic ) . href ( ) ) ;
2001-12-16 18:14:00 +00:00
res . write ( this . topic ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-12-16 18:14:00 +00:00
} else
res . write ( "online in weblog" ) ;
}
2001-06-18 08:57:33 +00:00
}
/ * *
2002-12-08 17:10:09 +00:00
* macro rendering createtime of story , either as editor ,
* plain text or as link to the frontpage of the day
2001-06-18 08:57:33 +00:00
* /
function createtime _macro ( param ) {
2002-04-08 11:56:18 +00:00
if ( param . as == "editor" ) {
if ( this . createtime )
2002-05-27 18:57:52 +00:00
param . value = formatTimestamp ( this . createtime , "yyyy-MM-dd HH:mm" ) ;
2002-04-08 11:56:18 +00:00
else
2002-05-27 18:57:52 +00:00
param . value = formatTimestamp ( new Date ( ) , "yyyy-MM-dd HH:mm" ) ;
2002-04-08 11:56:18 +00:00
param . name = "createtime" ;
2002-06-04 14:53:17 +00:00
renderInputText ( param ) ;
2002-12-08 17:10:09 +00:00
} else if ( this . createtime ) {
var text = formatTimestamp ( this . createtime , param . format ) ;
2002-12-23 14:58:26 +00:00
if ( param . as == "link" && this . online == 2 ) {
2002-12-08 17:10:09 +00:00
openLink ( this . site . get ( String ( this . day ) ) . href ( ) ) ;
res . write ( text ) ;
closeLink ( ) ;
} else
res . write ( text ) ;
2002-04-08 11:56:18 +00:00
}
2002-12-08 17:10:09 +00:00
return ;
2001-06-18 08:57:33 +00:00
}
2001-07-01 19:40:08 +00:00
/ * *
* macro renders the name of the author
2002-06-26 16:35:28 +00:00
* ! ! ! left for backwards - compatibility ! ! !
2001-07-01 19:40:08 +00:00
* /
function author _macro ( param ) {
2002-06-26 16:35:28 +00:00
this . creator _macro ( param ) ;
}
2001-07-21 22:01:36 +00:00
/ * *
* macro renders the name of the modifier
* /
function modifier _macro ( param ) {
2001-08-15 09:15:58 +00:00
if ( ! this . modifier )
2001-07-21 22:01:36 +00:00
return ;
if ( param . as == "link" && this . modifier . url ) {
2002-06-04 14:18:27 +00:00
openLink ( this . modifier . url ) ;
2001-07-21 22:01:36 +00:00
res . write ( this . modifier . name ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-07-21 22:01:36 +00:00
} else
res . write ( this . modifier . name ) ;
}
2001-10-21 12:04:38 +00:00
/ * *
* macro renders the url of this story
* /
function url _macro ( param ) {
res . write ( this . href ( ) ) ;
}
2001-06-18 08:57:33 +00:00
/ * *
* macro rendering a link to edit
* if user is allowed to edit
* /
function editlink _macro ( param ) {
2003-01-02 19:05:03 +00:00
if ( session . user && ! this . isEditDenied ( session . user , req . data . memberlevel ) ) {
2002-06-04 14:18:27 +00:00
openLink ( this . href ( "edit" ) ) ;
2002-06-26 16:35:28 +00:00
if ( param . image && this . site . images . get ( param . image ) )
this . site . renderImage ( this . site . images . get ( param . image ) , param ) ;
2001-06-18 08:57:33 +00:00
else
2001-07-21 22:01:36 +00:00
res . write ( param . text ? param . text : "edit" ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-06-18 08:57:33 +00:00
}
}
/ * *
* macro rendering a link to delete
2002-06-26 16:35:28 +00:00
* if user is creator of this story
2001-06-18 08:57:33 +00:00
* /
function deletelink _macro ( param ) {
2003-01-02 19:05:03 +00:00
if ( session . user && ! this . isDeleteDenied ( session . user , req . data . memberlevel ) ) {
2002-06-04 14:18:27 +00:00
openLink ( this . href ( "delete" ) ) ;
2002-06-26 16:35:28 +00:00
if ( param . image && this . site . images . get ( param . image ) )
this . site . renderImage ( this . site . images . get ( param . image ) , param ) ;
2001-06-18 08:57:33 +00:00
else
2001-07-21 22:01:36 +00:00
res . write ( param . text ? param . text : "delete" ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-06-18 08:57:33 +00:00
}
}
2001-11-18 13:23:36 +00:00
/ * *
* macro renders a link to
* toggle the online - status of this story
* /
function onlinelink _macro ( param ) {
2003-01-02 19:05:03 +00:00
if ( session . user && ! this . isEditDenied ( session . user , req . data . memberlevel ) ) {
2002-12-01 19:26:40 +00:00
if ( this . online && param . mode != "toggle" )
return ;
2002-06-04 14:18:27 +00:00
param . linkto = "edit" ;
2002-12-01 19:26:40 +00:00
param . urlparam = "set=" + ( this . online ? "offline" : "online" ) ;
2002-06-04 14:18:27 +00:00
openMarkupElement ( "a" , this . createLinkParam ( param ) ) ;
2002-06-26 16:35:28 +00:00
if ( param . image && this . site . images . get ( param . image ) )
this . site . renderImage ( this . site . images . get ( param . image ) , param ) ;
2001-11-18 13:23:36 +00:00
else
2002-12-01 19:26:40 +00:00
res . write ( this . online ? "set offline" : "set online" ) ;
2002-06-04 14:18:27 +00:00
closeMarkupElement ( "a" ) ;
2001-11-18 13:23:36 +00:00
}
}
/ * *
* macro renders a link to the story
* /
function viewlink _macro ( param ) {
2003-01-02 19:05:03 +00:00
if ( session . user && this . isViewDenied ( session . user , req . data . memberlevel ) )
2001-11-18 13:23:36 +00:00
return ;
2002-06-04 14:18:27 +00:00
openLink ( this . href ( ) ) ;
2002-06-26 16:35:28 +00:00
if ( param . image && this . site . images . get ( param . image ) )
this . site . renderImage ( this . site . images . get ( param . image ) , param ) ;
2001-11-18 13:23:36 +00:00
else
res . write ( param . text ? param . text : "view" ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-11-18 13:23:36 +00:00
}
2001-06-18 08:57:33 +00:00
/ * *
* macro rendering link to comments
* /
function commentlink _macro ( param ) {
2003-01-23 21:11:24 +00:00
if ( ! this . discussions || ! this . site . discussions )
2002-07-19 08:48:22 +00:00
return ;
openLink ( this . href ( param . to ? param . to : "comment" ) ) ;
res . write ( param . text ? param . text : "place your comment" ) ;
closeLink ( ) ;
2001-06-18 08:57:33 +00:00
}
2001-07-21 22:01:36 +00:00
2001-06-18 08:57:33 +00:00
/ * *
* macro renders number of comments
* options : text to use when no comment
* text to use when one comment
* text to use when more than one comment
2001-12-10 23:26:45 +00:00
* action to link to ( default : main )
2001-06-18 08:57:33 +00:00
* /
function commentcounter _macro ( param ) {
2002-12-01 19:26:40 +00:00
if ( ! this . discussions )
2002-07-19 08:48:22 +00:00
return ;
var commentCnt = this . comments . count ( ) ;
if ( ! param . linkto )
param . linkto = "main" ;
2002-07-29 16:00:47 +00:00
// cloning the param object to remove the macro-specific
// attributes from the clone for valid markup output:
var param2 = cloneObject ( param ) ;
delete param2 . one ;
delete param2 . more ;
delete param2 . no ;
var linkflag = ( param . as == "link" && param . as != "text" || ! param . as && commentCnt > 0 ) ;
if ( linkflag )
2002-07-29 13:04:45 +00:00
openMarkupElement ( "a" , this . createLinkParam ( param2 ) ) ;
2002-07-29 16:00:47 +00:00
if ( commentCnt == 0 )
2003-02-14 13:46:52 +00:00
res . write ( param . no ? param . no : "0 comments" ) ;
2002-07-29 16:00:47 +00:00
else if ( commentCnt == 1 )
2003-02-14 13:46:52 +00:00
res . write ( param . one ? param . one : "1 comment" ) ;
2002-07-29 16:00:47 +00:00
else
res . write ( commentCnt + ( param . more ? param . more : " comments" ) ) ;
if ( linkflag )
2002-07-19 08:48:22 +00:00
closeMarkupElement ( "a" ) ;
return ;
2001-06-18 08:57:33 +00:00
}
/ * *
* macro loops over comments and renders them
* /
function comments _macro ( param ) {
2002-08-21 13:21:05 +00:00
var s = this . story ? this . story : this ;
2002-12-01 19:26:40 +00:00
if ( ! s . discussions )
2002-07-19 08:48:22 +00:00
return ;
2002-10-01 11:34:59 +00:00
this . comments . prefetchChildren ( ) ;
2002-07-19 08:48:22 +00:00
for ( var i = 0 ; i < this . size ( ) ; i ++ ) {
var c = this . get ( i ) ;
var linkParam = new Object ( ) ;
linkParam . name = c . _id ;
2002-09-20 16:11:17 +00:00
openMarkupElement ( "a" , linkParam ) ;
closeMarkupElement ( "a" ) ;
2002-07-19 08:48:22 +00:00
if ( c . parent )
c . renderSkin ( "reply" ) ;
else
c . renderSkin ( "toplevel" ) ;
2001-06-18 08:57:33 +00:00
}
}
/ * *
* macro checks if user is logged in and not blocked
* if true , render form to add a comment
* /
function commentform _macro ( param ) {
2002-06-02 16:05:37 +00:00
if ( session . user ) {
2001-09-05 21:44:06 +00:00
var c = new comment ( ) ;
2002-10-05 16:09:56 +00:00
res . data . action = this . href ( "comment" ) ;
2001-09-05 21:44:06 +00:00
c . renderSkin ( "edit" ) ;
} else {
2002-06-26 16:35:28 +00:00
openLink ( this . site . members . href ( "login" ) ) ;
2001-09-05 21:44:06 +00:00
res . write ( param . text ? param . text : "login to add your comment!" ) ;
2002-06-04 14:18:27 +00:00
closeLink ( ) ;
2001-09-05 21:44:06 +00:00
}
2001-06-18 08:57:33 +00:00
}
/ * *
2001-10-21 12:04:38 +00:00
* macro left for backwards - compatibility
* calls global image _macro ( )
2001-06-18 08:57:33 +00:00
* /
function image _macro ( param ) {
2001-10-21 12:04:38 +00:00
image _macro ( param ) ;
2001-07-18 15:58:18 +00:00
}
2001-07-21 22:01:36 +00:00
2001-08-26 19:15:29 +00:00
/ * *
2001-10-21 12:04:38 +00:00
* macro left for backwards - compatibility
2002-06-04 18:11:59 +00:00
* calls global image _macro ( ) as "popup"
2001-08-26 19:15:29 +00:00
* /
function thumbnail _macro ( param ) {
2002-06-04 18:11:59 +00:00
param . as = "popup" ;
image _macro ( param ) ;
2001-08-26 19:15:29 +00:00
}
2001-07-21 22:01:36 +00:00
/ * *
* macro renders the property of story that defines if
* other users may edit this story
* /
function editableby _macro ( param ) {
2002-06-26 16:35:28 +00:00
if ( param . as == "editor" && ( session . user == this . creator || ! this . creator ) ) {
2003-02-14 13:46:52 +00:00
var options = new Array ( null , 0 , 1 ) ;
var labels = new Array ( "the Author" , "all Subscribers" , "all Contributors" ) ;
for ( var i = 0 ; i < options . length ; i ++ ) {
param . name = "editableby" ;
param . value = options [ i ] ;
param . selectedValue = this . editableby ;
renderInputRadio ( param ) ;
res . write ( " " ) ;
res . write ( labels [ i ] ) ;
res . write ( " " ) ;
}
2001-07-21 22:01:36 +00:00
} else {
if ( this . editableby == 0 )
2002-06-26 16:35:28 +00:00
res . write ( "Subscribers of and Contributors to " + this . site . title ) ;
2001-07-21 22:01:36 +00:00
else if ( this . editableby == 1 )
2002-06-26 16:35:28 +00:00
res . write ( "Contributors to " + this . site . title ) ;
2001-11-03 09:21:43 +00:00
else
2002-06-26 16:35:28 +00:00
res . write ( "Content Managers and Admins of " + this . site . title ) ;
2001-07-21 22:01:36 +00:00
}
2002-12-01 19:26:40 +00:00
return ;
2001-08-24 11:59:24 +00:00
}
2002-07-19 08:48:22 +00:00
/ * *
* macro renders a checkbox for enabling / disabling discussions
2002-08-09 11:53:32 +00:00
* for backwards compatibility this macro also renders a hidden input
* so that we can check if the checkbox is embedded in story / edit . skin
2002-07-19 08:48:22 +00:00
* /
function discussions _macro ( param ) {
if ( param . as == "editor" ) {
2002-12-01 19:26:40 +00:00
if ( this . discussions == null && path . site . discussions )
2002-08-09 11:53:32 +00:00
param . checked = "checked" ;
2002-07-19 08:48:22 +00:00
renderInputCheckbox ( this . createInputParam ( "discussions" , param ) ) ;
2002-08-09 11:53:32 +00:00
var attr = new Object ( ) ;
attr . type = "hidden" ;
attr . name = "discussions" ;
attr . value = "0" ;
renderMarkupElement ( "input" , attr ) ;
2002-07-19 08:48:22 +00:00
} else
2002-12-01 19:26:40 +00:00
res . write ( this . discussions ? "yes" : "no" ) ;
2002-07-19 08:48:22 +00:00
}
2002-01-05 02:33:50 +00:00
/ * *
* macro renders a list of existing topics as dropdown
* /
function topicchooser _macro ( param ) {
2002-06-26 16:35:28 +00:00
var size = path . site . topics . size ( ) ;
2002-01-05 02:33:50 +00:00
var options = new Array ( ) ;
for ( var i = 0 ; i < size ; i ++ ) {
2002-06-26 16:35:28 +00:00
var topic = path . site . topics . get ( i ) ;
2002-01-05 02:33:50 +00:00
if ( topic . size ( ) ) {
2002-02-10 16:35:18 +00:00
options [ i ] = topic . groupname ;
2002-01-05 02:33:50 +00:00
if ( this . topic == topic . groupname )
2002-02-10 16:35:18 +00:00
var selectedIndex = i ;
2002-01-05 02:33:50 +00:00
}
}
2002-06-03 16:56:14 +00:00
renderDropDownBox ( "topicidx" , options , selectedIndex , "-- choose topic --" ) ;
2002-01-05 02:33:50 +00:00
}
2002-02-10 16:35:18 +00:00
/ * *
* macro renders the name of the topic this story belongs to
2002-07-26 17:09:40 +00:00
* either as link , image ( if an image entiteld by the
* topic name is available ) or plain text
* NOTE : for backwards compatibility , the default is a link and
* you have to set "text" explicitely ( which is not so nice , imho . )
2002-02-10 16:35:18 +00:00
* /
function topic _macro ( param ) {
if ( ! this . topic )
return ;
2002-07-26 17:09:40 +00:00
if ( ! param . as || param . as == "link" ) {
2002-12-17 21:15:23 +00:00
openLink ( this . site . topics . href ( this . topic ) ) ;
2002-07-26 17:09:40 +00:00
res . write ( this . topic ) ;
closeLink ( ) ;
}
else if ( param . as == "image" ) {
2002-08-22 15:45:44 +00:00
if ( ! param . imgprefix )
param . imgprefix = "topic_" ;
var img = getPoolObj ( param . imgprefix + this . topic , "images" ) ;
2002-07-26 17:09:40 +00:00
if ( ! img )
return ;
2002-12-17 21:15:23 +00:00
openLink ( this . site . topics . href ( this . topic ) ) ;
2002-07-26 17:09:40 +00:00
renderImage ( img . obj , param )
closeLink ( ) ;
}
else if ( param . as = "text" )
res . write ( this . topic ) ;
2002-04-08 11:56:18 +00:00
}
2002-04-24 13:35:44 +00:00
2002-04-25 08:00:33 +00:00
/ * *
* macro returns a list of references linking to a story
2002-12-08 13:49:33 +00:00
* since referrers are asynchronously written to database by scheduler
* it makes sense to cache them in story . cache . rBacklinks because they
* won ' t change until the next referrer - update was done
* @ return String rendered backlinks
2002-04-25 08:00:33 +00:00
* /
2002-12-08 15:37:03 +00:00
function backlinks _macro ( param ) {
2002-12-08 13:49:33 +00:00
// check if scheduler has done a new update of accesslog
// if not and we have cached backlinks simply return them
2003-02-06 19:17:32 +00:00
if ( this . cache . lrBacklinks >= app . data . lastAccessLogUpdate )
2002-12-08 13:49:33 +00:00
return ( this . cache . rBacklinks )
var c = getDBConnection ( "antville" ) ;
var dbError = c . getLastError ( ) ;
if ( dbError )
2002-12-01 19:26:40 +00:00
return ( getMessage ( "error" , "database" , dbError ) ) ;
2002-12-08 13:49:33 +00:00
// we're doing this with direct db access here
// (there's no need to do it with prototypes):
var query = "select ACCESSLOG_REFERRER, count(*) as \"COUNT\" from AV_ACCESSLOG where ACCESSLOG_F_TEXT = " + this . _id + " group by ACCESSLOG_REFERRER order by \"COUNT\" desc, ACCESSLOG_REFERRER asc;" ;
var rows = c . executeRetrieval ( query ) ;
var dbError = c . getLastError ( ) ;
if ( dbError )
2002-12-01 19:26:40 +00:00
return ( getMessage ( "error" , "database" , dbError ) ) ;
2002-12-08 13:49:33 +00:00
// we show a maximum of 100 backlinks
var limit = Math . min ( ( param . limit ? parseInt ( param . limit , 10 ) : 100 ) , 100 ) ;
var backlinks = new java . lang . StringBuffer ( ) ;
2002-12-08 15:37:03 +00:00
// if user specified some servers to be excluded from backlink-list
// create the RegExp-Object for filtering
if ( param . exclude ) {
var r = new RegExp ( "\\s*,\\s*" ) ;
r . global = true ;
var excludeStr = param . exclude . replace ( r , "|" ) ;
var exclude = new RegExp ( excludeStr ) ;
}
var skinParam = new Object ( ) ;
var cnt = 0 ;
while ( rows . next ( ) && cnt <= limit ) {
skinParam . count = rows . getColumnItem ( "COUNT" ) ;
skinParam . referrer = rows . getColumnItem ( "ACCESSLOG_REFERRER" ) ;
if ( exclude && exclude . test ( skinParam . referrer ) )
2002-12-08 13:49:33 +00:00
continue ;
2002-12-08 15:37:03 +00:00
skinParam . text = skinParam . referrer . length > 50 ? skinParam . referrer . substring ( 0 , 50 ) + "..." : skinParam . referrer ;
backlinks . append ( this . renderSkinAsString ( "backlinkItem" , skinParam ) ) ;
cnt ++ ;
2002-12-08 13:49:33 +00:00
}
2002-04-26 13:07:51 +00:00
rows . release ( ) ;
2002-12-08 15:37:03 +00:00
// cache rendered backlinks and set timestamp for
// checking if backlinks should be rendered again
skinParam = new Object ( ) ;
2002-12-08 13:49:33 +00:00
if ( backlinks . length ( ) > 0 ) {
2002-12-08 15:37:03 +00:00
skinParam . referrers = backlinks . toString ( ) ;
this . cache . rBacklinks = this . renderSkinAsString ( "backlinks" , skinParam ) ;
} else
this . cache . rBacklinks = "" ;
this . cache . lrBacklinks = new Date ( ) ;
return ( this . cache . rBacklinks ) ;
2002-12-17 21:15:23 +00:00
}
2003-02-14 13:46:52 +00:00
/ * *
* macro renders a checkbox whether the story is just published in a topic or also in weblog
* /
function justintopic _macro ( param ) {
if ( param . as == "editor" ) {
if ( this . online == "1" )
param . value = "1" ;
param . name = "justintopic" ;
renderInputCheckbox ( param ) ;
}
}