Example #1
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _channelid, _channelname;
     exp = tag.AttributeValue("channelid");
     if (exp == null)
         throw new Exception("没有channelid标签");
     _channelid = manager.EvalExpression(exp).ToString();
     _channelname = (new JumboTCMS.DAL.Normal_ChannelDAL().GetChannelName(_channelid));
     manager.WriteValue(_channelname);
 }
Example #2
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _channelid, _channelishtml, _channellink;
     exp = tag.AttributeValue("channelid");
     if (exp == null)
         throw new Exception("没有channelid标签");
     _channelid = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("channelishtml");
     if (exp == null)
         _channelishtml = "0";
     _channelishtml = manager.EvalExpression(exp).ToString();
     _channellink = (new Normal_ChannelDAL()).GetChannelLink(_channelishtml == "1", _channelid, false);
     manager.WriteValue(_channellink);
 }
Example #3
0
 public void TagBeginProcess(TemplateManager manager, Tag tag, ref bool processInnerElements, ref bool captureInnerContent)
 {
     processInnerElements = true;
     captureInnerContent = true;
 }
Example #4
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _sitedir, _channelid, _channeltype, _contentid, _viewnum;
     exp = tag.AttributeValue("sitedir");
     if (exp == null)
         throw new Exception("没有sitedir标签");
     _sitedir = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("channelid");
     if (exp == null)
         throw new Exception("没有channelid标签");
     _channelid = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("channeltype");
     if (exp == null)
         throw new Exception("没有channeltype标签");
     _channeltype = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("contentid");
     if (exp == null)
         throw new Exception("没有contentid标签");
     _contentid = manager.EvalExpression(exp).ToString();
     _viewnum = "<script src=\"" + _sitedir + "plus/viewcount.aspx?ccid=" + _channelid + "&cType=" + _channeltype + "&id=" + _contentid + "&addit=0\"></script>";
     manager.WriteValue(_viewnum);
 }
Example #5
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _sitedir, _isimg, _img, _imgurl;
     exp = tag.AttributeValue("sitedir");
     if (exp == null)
         throw new Exception("没有sitedir标签");
     _sitedir = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("isimg");
     if (exp == null)
         _isimg = "0";
     else
         _isimg = manager.EvalExpression(exp).ToString();
     exp = tag.AttributeValue("img");
     if (exp == null)
         _img = "";
     else
         _img = manager.EvalExpression(exp).ToString();
     if (_isimg == "0" || _img.Length == 0)
         _imgurl = _sitedir + "style/common/nophoto.jpg";
     else
         _imgurl = _img;
     manager.WriteValue(_imgurl);
 }
Example #6
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _title, _formattitle;
     exp = tag.AttributeValue("title");
     if (exp == null)
         throw new Exception("没有title标签");
     _title = manager.EvalExpression(exp).ToString();
     _formattitle = JumboTCMS.Utils.Strings.HtmlEncode(_title);
     manager.WriteValue(_formattitle);
 }
Example #7
0
 public void TagEndProcess(TemplateManager manager, Tag tag, string innerContent)
 {
     Expression exp;
     string _len, _cutstring;
     exp = tag.AttributeValue("len");
     if (exp == null)
         throw new Exception("没有len标签");
     _len = manager.EvalExpression(exp).ToString();
     _cutstring = JumboTCMS.Utils.Strings.CutString(JumboTCMS.Utils.Strings.NoHTML(innerContent), Convert.ToInt32(_len));
     manager.WriteValue(_cutstring);
 }