Jot - MODX Community Forums https://forums.modx.com/board/?board=71 <![CDATA[Problem with preg_replace() since upgrade to php7/mysql5.7]]> https://forums.modx.com/thread/100758/problem-with-preg-replace-since-upgrade-to-php7-mysql5-7#dis-post-544479
ErrorType[num] 	WARNING[2]
File 	/home/public_html/assets/snippets/jot/includes/phx.parser.class.inc.php
Line 	254
Source 	$output = preg_replace("~(\b\w+\b)~e","wordwrap('\\1',\$wrapat,' ',1)",$output);
Current Snippet 	Jot

Error : preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead


Any easy way to fix this?]]>
https://forums.modx.com/thread/100758/problem-with-preg-replace-since-upgrade-to-php7-mysql5-7#dis-post-544479 Thu, 25 Aug 2016 10:18:30 +0000 https://forums.modx.com/thread/100758/problem-with-preg-replace-since-upgrade-to-php7-mysql5-7#dis-post-544479
<![CDATA[Howto use tinymce or other RTE in posting jot comments]]> https://forums.modx.com/thread/43182/howto-use-tinymce-or-other-rte-in-posting-jot-comments#dis-post-516662
Regards,

Mike]]>
https://forums.modx.com/thread/43182/howto-use-tinymce-or-other-rte-in-posting-jot-comments#dis-post-516662 Fri, 12 Dec 2014 03:56:49 +0000 https://forums.modx.com/thread/43182/howto-use-tinymce-or-other-rte-in-posting-jot-comments#dis-post-516662
<![CDATA[Adding smilies to JOT]]> https://forums.modx.com/thread/43072/adding-smilies-to-jot#dis-post-477981
A few weeks back i made an modx site with a guestbook powered by jot. it was quite good and spam free but it missed one thing: smileys! Yesterday i started the work on my own personal blog and i tried to find a simple way add smileys and i quite found a way that for most user is understandable too.

so here how I made this questbook (demo: http://robbinoost.nl/gastenboek.html )

a note before i start: I worked with  1.0 version with comes standard with modx 0.9.5 (yeah i really need to update i know). But i think with a little search and stuff you'll get there with an other version to. 

How it works? it works quite simple: text that is posted in the main text box will be analyzed and part of the text will be replace. so for example :-lol-: will turn out as an smiley. An second function is that under the textbox you'll see a list with the smileys and when you click on one of them you'll get the code (in this case: :-lol-:) withch will be replaced when you post your msg.

Step 1: Find yourself some smilies, i used a few from the phpBB plus pack. download the images in: public_html/images/smilies.

Step 2:  Duplicate the template(like in manager -> resources -> templates)  you want to use for your questbook and call it whatever you like. Place the following javascript code between the <head> tags:

 

<script type="text/javascript">
function AddSmile(SmileCode) {
var bericht = window.document.getElementById("bericht");
bericht.value += SmileCode;
bericht.focus();
return;
}

</script>

<br /><br />you’ll see a line that says: <br />

var bericht = window.document.getElementById("bericht");
<br />i used ’bericht’ as id (means message in dutch) name it whatever you like but remember how you named it!. Don’t change anything else.<br /><br /><br />step 3: open chunck.form.inc and find the textbox of which the name is=content. in that line add:<br />
 
id="bericht"
<br />use the same id that you’ll had in step 2. my code is then:<br />

<textarea id="bericht" tabindex="[+jot.seed:math=`?+4`+]" name="content" cols="50" rows="5">[+form.field.content:esc+]</textarea>
<br /><br />Step 4: Making a smiley line to pick your smilie from.<br />open chunck.form.inc an add under your main textbox (content) an table liek this one:<br /><br />

<table border="0" cellspacing="1" cellpadding="4" class="smiley">
<tr>
<td><img src="images/smilies/smile.gif" alt="" onclick="AddSmile(':)')" />
</td>
<td><img src="images/smilies/icon_sadley.gif" alt="" onclick="AddSmile(':(')" />
</td>
<td><img src="images/smilies/biggrin.gif" alt="happy" onclick="AddSmile(':D')" />
</td>
<td><img src="images/smilies/frown.gif" alt="" onclick="AddSmile(':@')" />
</td>
<td><img src="images/smilies/confused.gif" alt="" onclick="AddSmile('(A)')" />
</td>
<td><img src="images/smilies/willy_nilly.gif" alt="" onclick="AddSmile(':O')" />
</td>
<td><img src="images/smilies/wink.gif" alt="" onclick="AddSmile(';)')" />
</td>
<td><img src="images/smilies/winkpuh.gif" alt="" onclick="AddSmile(':P')" />
</td>
<td><img src="images/smilies/icon_takeitdown.gif" alt="" onclick="AddSmile(':takeit:')" />
</td>
<td><img src="images/smilies/redface.gif" alt="" onclick="AddSmile(':BD')" />
</td>
<td><img src="images/smilies/pompom.gif" alt="" onclick="AddSmile(':B)')" />
</td>
<td><img src="images/smilies/icon_bow.gif" alt="" onclick="AddSmile(':!:')" />
</td>
<td><img src="images/smilies/coool.gif" alt="" onclick="AddSmile(':cool:')" />
</td>
<td><img src="images/smilies/icon_troost.gif" alt="" onclick="AddSmile(':troost:')" />
</td>
</tr>
</table>
<br /><br />so you see that i displayed all my smileys simple with img tags but on the end it says:<br />

onclick="AddSmile(':troost:')"
<br /> this is very important! it calls the javascript code from the <head > tags to add everything between the (’ and ’) so teh code of this smiley is :troost: <br /><br />now lets do the magic<br />Step 5: replacing<br /><br />open jot.class.inc and around line 458 (version 1) you find:<br />


// Render comments
$count = count($array_comments);
$comments = array();

// Comment Numbering
for ($i = 0; $i < $count; $i++) {
$num = ($this->config["numdir"]) ? $commentTotal - ($pageOffset + $i) : $pageOffset + ($i+1);
$array_comments[$i]["postnumber"] = $num;
}



for ($i = 0; $i < $count; $i++) {
$chunk["rowclass"] = $this->getChunkRowClass($i+1,$array_comments[$i]["createdby"]);
$tpl = new CChunkie($this->templates["comments"]);
$tpl->AddVar('jot',$this->config);
$tpl->AddVar('comment',$array_comments[$i]);
$tpl->AddVar('chunk',$chunk);
$comments[] = $tpl->Render();
}


$this->config["html"]["comments"] = $output_comments = join("",$comments);
$this->config["html"]["navigation"] = $output_navigation;
$output_comments = $output_subscribe.$output_moderate.$output_navigation.$output_comments.$output_navigation;



}
if ($this->config["output"]) return $output_comments;
}

function processForm($id=0) {
global $modx;
<br /><br />add these lines:<br />
	
//-----------------------------------------------------------
// Smilies code by RWQ
//-----------------------------------------------------------



$comments = str_replace (":)","<img src=images/smilies/smile.gif />", $comments);
$comments = str_replace (":(","<img src=images/smilies/icon_sadley.gif />", $comments);
$comments = str_replace (":D","<img src=images/smilies/biggrin.gif />", $comments);
$comments = str_replace (":@","<img src=images/smilies/frown.gif />", $comments);
$comments = str_replace ("(A)","<img src=images/smilies/confused.gif />", $comments);
$comments = str_replace (":O","<img src=images/smilies/willy_nilly.gif />", $comments);
$comments = str_replace (";)","<img src=images/smilies/wink.gif />", $comments);
$comments = str_replace (":P","<img src=images/smilies/winkpuh.gif />", $comments);
$comments = str_replace (":takeit:","<img src=images/smilies/icon_takeitdown.gif />", $comments);
$comments = str_replace (":BD","<img src=images/smilies/redface.gif />", $comments);
$comments = str_replace (":B)","<img src=images/smilies/pompom.gif />", $comments);
$comments = str_replace (":!:","<img src=images/smilies/icon_bow.gif />", $comments);
$comments = str_replace (":cool:","<img src=images/smilies/coool.gif />", $comments);
$comments = str_replace (":troost:","<img src=images/smilies/icon_troost.gif />", $comments);
<br /><br />between: <br />
			
// Comment Numbering
for ($i = 0; $i < $count; $i++) {
$num = ($this->config["numdir"]) ? $commentTotal - ($pageOffset + $i) : $pageOffset + ($i+1);
$array_comments[$i]["postnumber"] = $num;
}



for ($i = 0; $i < $count; $i++) {
$chunk["rowclass"] = $this->getChunkRowClass($i+1,$array_comments[$i]["createdby"]);
$tpl = new CChunkie($this->templates["comments"]);
$tpl->AddVar('jot',$this->config);
$tpl->AddVar('comment',$array_comments[$i]);
$tpl->AddVar('chunk',$chunk);
$comments[] = $tpl->Render();
}

<br />and<br />


$this->config["html"]["comments"] = $output_comments = join("",$comments);
$this->config["html"]["navigation"] = $output_navigation;
$output_comments = $output_subscribe.$output_moderate.$output_navigation.$output_comments.$output_navigation;



}
if ($this->config["output"]) return $output_comments;
}

function processForm($id=0) {
global $modx;

<br /><br />in total:<br />
				
// Comment Numbering
for ($i = 0; $i < $count; $i++) {
$num = ($this->config["numdir"]) ? $commentTotal - ($pageOffset + $i) : $pageOffset + ($i+1);
$array_comments[$i]["postnumber"] = $num;
}



for ($i = 0; $i < $count; $i++) {
$chunk["rowclass"] = $this->getChunkRowClass($i+1,$array_comments[$i]["createdby"]);
$tpl = new CChunkie($this->templates["comments"]);
$tpl->AddVar('jot',$this->config);
$tpl->AddVar('comment',$array_comments[$i]);
$tpl->AddVar('chunk',$chunk);
$comments[] = $tpl->Render();
}


//-----------------------------------------------------------
// Smilies code by RWQ
//-----------------------------------------------------------



$comments = str_replace (":)","<img src=images/smilies/smile.gif />", $comments);
$comments = str_replace (":(","<img src=images/smilies/icon_sadley.gif />", $comments);
$comments = str_replace (":D","<img src=images/smilies/biggrin.gif />", $comments);
$comments = str_replace (":@","<img src=images/smilies/frown.gif />", $comments);
$comments = str_replace ("(A)","<img src=images/smilies/confused.gif />", $comments);
$comments = str_replace (":O","<img src=images/smilies/willy_nilly.gif />", $comments);
$comments = str_replace (";)","<img src=images/smilies/wink.gif />", $comments);
$comments = str_replace (":P","<img src=images/smilies/winkpuh.gif />", $comments);
$comments = str_replace (":takeit:","<img src=images/smilies/icon_takeitdown.gif />", $comments);
$comments = str_replace (":BD","<img src=images/smilies/redface.gif />", $comments);
$comments = str_replace (":B)","<img src=images/smilies/pompom.gif />", $comments);
$comments = str_replace (":!:","<img src=images/smilies/icon_bow.gif />", $comments);
$comments = str_replace (":cool:","<img src=images/smilies/coool.gif />", $comments);
$comments = str_replace (":troost:","<img src=images/smilies/icon_troost.gif />", $comments);
<br /><br /><br /><br /> $this->config["html"]["comments"] = $output_comments = join("",$comments);<br /> $this->config["html"]["navigation"] = $output_navigation;<br /> $output_comments = $output_subscribe.$output_moderate.$output_navigation.$output_comments.$output_navigation;<br /> <br /> <br /> <br /> } <br /> if ($this->config["output"]) return $output_comments;<br /> }<br /> <br /> function processForm($id=0) {<br /> global $modx;<br /><br />

you’ll see that a simpel php string replace statement the smiley code between " " (":troost:") change these lines on a way that they will corespendond with the images set in step 4 (so the combination of smilie code and image is teh same).

than your done!

hope you can use it!

RWQ



ps: for those asking how it is with my phpBB snippet: quite rubbish when added some functions i keep getting loads and loads of errors that even effect the databsetables at some point. so i dropped it for a moment, and maybe when i know php betetr i’ll continue


]]>
https://forums.modx.com/thread/43072/adding-smilies-to-jot#dis-post-477981 Tue, 17 Sep 2013 03:42:27 +0000 https://forums.modx.com/thread/43072/adding-smilies-to-jot#dis-post-477981
<![CDATA[can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-466647
i’m using Jot (1.1.2) to gather customer testimonials, which is working perfectly with moderation, notification, etc. however i need to be able to show a random "comment" on the homepage. is it possible to have Jot display one random comment?

many thanks smiley
]]>
https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-466647 Sat, 18 May 2013 08:32:03 +0000 https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-466647
<![CDATA[Placeholders for Jot notification emails]]> https://forums.modx.com/thread/43362/placeholders-for-jot-notification-emails#dis-post-425297
[+siteurl+][+jot.link.view+][+jot.querykey.view+]=1

turns into "www.domainname.com(yams_doc:id)…" instead of the url that the YAMS placeholder stands for. Has anyone else run into this before? How do I get the email to show the correct url? Thanks in advance.]]>
https://forums.modx.com/thread/43362/placeholders-for-jot-notification-emails#dis-post-425297 Wed, 30 May 2012 03:46:14 +0000 https://forums.modx.com/thread/43362/placeholders-for-jot-notification-emails#dis-post-425297
<![CDATA[MODx Revolution and Jot]]> https://forums.modx.com/thread/43184/modx-revolution-and-jot#dis-post-419742
The bad

The current version of Jot will not work in 0.9.7.
I also will not respond to any problems related to the use of Jot 1.x in MODx 0.9.7 alpha.

The good

Jot 2.0.0 alpha is on his way.
Harvesting the power of the new framework and delivering all the current features and more.
Your wishes have been reviewed and, in most cases, will be implemented in one way or the other.
But... don’t expect a fully working feature set on this first release (as the ’alpha’ already should imply).

The promise

I hope, and i say this very carefully, to have the alpha ready before the start of next week.
Having set this public deadline now i will probably invest some more time into development the next couple of days tongue


Will be released when it’s done wink I’m also developing a complete reusable toolset that will really speed up future projects.
]]>
https://forums.modx.com/thread/43184/modx-revolution-and-jot#dis-post-419742 Wed, 11 Apr 2012 03:15:41 +0000 https://forums.modx.com/thread/43184/modx-revolution-and-jot#dis-post-419742
<![CDATA[Jot not notifying by email]]> https://forums.modx.com/thread/43037/jot-not-notifying-by-email#dis-post-414047
[[Jot? &placeholders=`1` &output=`0` &numdir=`0` &moderated=`1` &notify=`2` &css=`0` &sortby=`createdon:a` &subscribe=`1` &validate=`email:Email address not valid. Sort it out.:email,name:A name is required.` &customfields=`name,website,email` ]]

Any thoughts anyone?]]>
https://forums.modx.com/thread/43037/jot-not-notifying-by-email#dis-post-414047 Wed, 29 Feb 2012 10:52:55 +0000 https://forums.modx.com/thread/43037/jot-not-notifying-by-email#dis-post-414047
<![CDATA[LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-406904 Recently I have rewritten/generalized the code used for such rendering by adding templating feature, date formats, etc.

Download: http://setpro.pl/download.php?item=latestcomments.txt
Small article: http://setpro.pl/software/latest-comments

Some guidelines on how to use this snippet have been included into its header. I am pasting those instructions here...
Parameters:
parents - which container(s) to fetch the comments from (default: 0, entire site)
count - how many latest comments to fetch (optional; default: 6)
customFields - comma-separated list of custom fields (optional; default: name,email)
posterField - poster’s field name (optional; default: name)
dateFormat - PHP’s date() format for createdon, editedon fields (optional; default: Y-m-d, H:i:s)
tplComment - chunk containing template for a single comment (REQUIRED; see example below)
trunc - at which symbol the comment should be truncated (default: 0, do not truncate)
truncSym - symbol/string to use for marking truncation (default: ’...’)
Sample usage:
[!LatestComments? &count=`3` &customFields=`name,website` &tplComment=`tpl-comment`!]
Sample template (chunk tpl-comment):
<div class="poster"><a href="[+jcf_website+]">[+jcf_name+]</a> on [+createdon+] said:</div>
<div class="post">&quot;[+content+]&quot;</div>
<div class="link">Read full article <a href="[~[+doc_id+]~]">[+doc_pagetitle+]</a>...</div>
Comment’s main placeholders:
[+id+] - internal id of the comment
[+title+] - self-explanatory
[+tagid+] - value used to distinguish two (or more) Jot calls on the same page
[+uparent+] - id of the document that the comment is attached to
[+secip+] - IP of the remote machine that the comment has been submitted from
[+content+] - self-explanatory
[+createdby+] - full name of the author (either MODx user or poster-provided value)
[+createdon+] - date of the creation (formatted with dateFormat)
[+editedby+] - full name of the MODx user who latest accessed/changed the comment
[+editedon+] - date for the above action (formatted with dateFormat)
[+publishedby+] - full name of the MODx user who published the comment (if in moderated mode)
[+publishedon+] - date for the above action (formatted with dateFormat)
Comment’s custom placeholders:
[+jcf_...+]
Document’s placeholders:
[+doc_id+]
[+doc_pagetitle+]
[+doc_longtitle+]
[+doc_description+]
[+doc_introtext+]
Important remarks:
Please notice that placeholders for Jot custom fields SHOULD BE prefixed with "jcf_"
Both [+uparent+] and [+doc_id+] stand for the same value]]>
https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-406904 Wed, 11 Jan 2012 08:40:24 +0000 https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-406904
<![CDATA[Question regarding `username` placeholder in Jot]]> https://forums.modx.com/thread/71862/question-regarding-username-placeholder-in-jot#dis-post-400424
We have a blog for registered users (students of acupuncture) and when I post comments using Jot, I'm using the basic placeholder: [+comment.createdby:userinfo=`username`+]

What I've been trying to find, is a way to post first and last names instead. ...I can't find anything and am hoping I don't have to modify the snippet..

Thanks in advance...]]>
https://forums.modx.com/thread/71862/question-regarding-username-placeholder-in-jot#dis-post-400424 Thu, 17 Nov 2011 11:08:06 +0000 https://forums.modx.com/thread/71862/question-regarding-username-placeholder-in-jot#dis-post-400424
<![CDATA[Trouble adding website link in jot]]> https://forums.modx.com/thread/70178/trouble-adding-website-link-in-jot#dis-post-393048
I have a custom url field in my guestbook form. It is saving the url that is entered and in my code I check if the url field is empty and if not I add <a> tags around the name of the person who posted the comment.

My code:
[+phx:if=`[+comment.custom.web+]`:ne=``:then=`<a href="[+comment.custom.web+]" target="_blank">
		      [+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
                  </a>`:else=`
                      [+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
                  `+]	


If I enter the url as "http://www.google.com" it works fine and dandy. But if I enter the url as "www.google.com" I then get "http://myurl.com/www.google.com" (aka my baseurl and then the url they entered).

If there some setting I don't have right? Or some extra code I should be adding?
Thanks for the help.]]>
https://forums.modx.com/thread/70178/trouble-adding-website-link-in-jot#dis-post-393048 Mon, 12 Sep 2011 04:07:48 +0000 https://forums.modx.com/thread/70178/trouble-adding-website-link-in-jot#dis-post-393048
<![CDATA[Uncached Jot call on a cached page]]> https://forums.modx.com/thread/69848/uncached-jot-call-on-a-cached-page#dis-post-391740
I use an uncached Jot call on a cached page in combination with PHx validation.

[+phx:if=`[!Jot? &action=`count-comments`!]`:is=`0`:then=``:else=`
	<div class="comments contentblock clearfix">
		<h2>Comments ([!Jot? &action=`count-comments`!])</h2>
[!Jot? &css=`0` &action=`comments` &subscribe=`1` &sortby=`createdon:a` &numdir=`0` &notifyAuthor=`1` &moderated=`0` &tplComments=`CommentsTpl`!]
	</div>
`+]					
	<div class="last entercomments contentblock clearfix">
[!Jot? &css=`0` &action=`form` &subscribe=`1` &sortby=`createdon:a` &numdir=`0` &notifyAuthor=`1` &moderated=`0` &tplComments=`CommentsTpl`!]
	</div>


I use the action parameter to put the form below the list of comments. This was mentioned as a solution to have a custom order of the different placeholders in combination with PHx. The standard solution with the placeholders does not work.

The problem I still have, is that the list of comments is not updated after submitting the form. The user needs to refresh the page to see his post. When I put the jot-call with &action=`comments after the call with &action=`form` then the list is refreshed immediately! So it seems the order of the calls is causing the problem ...

The problem has nothing to do with PHx. When I disable PHx, the problem is the same.

Anyone with a solution?

Many thx
Gino]]>
https://forums.modx.com/thread/69848/uncached-jot-call-on-a-cached-page#dis-post-391740 Mon, 29 Aug 2011 04:33:12 +0000 https://forums.modx.com/thread/69848/uncached-jot-call-on-a-cached-page#dis-post-391740
<![CDATA[Jot CSS]]> https://forums.modx.com/thread/43251/jot-css#dis-post-249601

[[Jot? &customfields=`name,email,location,website` &placeholders=`1` &output=`0` &css=`0` &numdir=`0` &tplComments=`comment` &tplForm=`sacuda-comment-form` &tplNav=`sacuda-comments-nav` &tplModerate=`sacuda-comments-mod` &validate=`name:You must enter a name to leave a comment.,content:You forgot to enter a comment!,email:Please enter a valid e-mail address.:email`]]



The &css parameter has no effect the default sheet is always linked. If I add &cssFile, rather than removing the default it adds a second style sheet. Also the following have no effect:
&cssRowAlt
&cssRowMe
&cssRowAuthor

All of the other parameters seem to be working fine.

Any ideas?

Thanks]]>
https://forums.modx.com/thread/43251/jot-css#dis-post-249601 Thu, 18 Aug 2011 09:33:36 +0000 https://forums.modx.com/thread/43251/jot-css#dis-post-249601
<![CDATA[Jot (1.1.4) logs out when deleting spam comments?]]> https://forums.modx.com/thread/43386/jot-1-1-4-logs-out-when-deleting-spam-comments#dis-post-250086
When I developed the site with ditto and jot I tested all this functionality and it worked very well. This strange problem then occurred when I needed it most. I observed the problem in Chrome, Netscape, Firefox and IE.

A few days later the problem disappeared and the delete functionality worked fine. I’m using Modx evolution 1.0.2

Any suggestions other than moving to a new Modx version or snippet version? Thanks]]>
https://forums.modx.com/thread/43386/jot-1-1-4-logs-out-when-deleting-spam-comments#dis-post-250086 Sat, 06 Aug 2011 09:39:33 +0000 https://forums.modx.com/thread/43386/jot-1-1-4-logs-out-when-deleting-spam-comments#dis-post-250086
<![CDATA[ [SOLVED] Captcha problem (disable for manager, enable for jot)]]> https://forums.modx.com/thread/43385/solved-captcha-problem-disable-for-manager-enable-for-jot#dis-post-250082
In order to show captcha in JOT form I enabled this option via manager configuration. Of course I get Captcha for manager login also. Any way to disable captcha for manager login, but leave it enabled for jot?

Thanks]]>
https://forums.modx.com/thread/43385/solved-captcha-problem-disable-for-manager-enable-for-jot#dis-post-250082 Fri, 05 Aug 2011 05:15:02 +0000 https://forums.modx.com/thread/43385/solved-captcha-problem-disable-for-manager-enable-for-jot#dis-post-250082
<![CDATA[Closing comments]]> https://forums.modx.com/thread/43384/closing-comments#dis-post-250075 https://forums.modx.com/thread/43384/closing-comments#dis-post-250075 Tue, 05 Jul 2011 12:42:13 +0000 https://forums.modx.com/thread/43384/closing-comments#dis-post-250075 <![CDATA["No comments yet" notice for Comments placeholder?]]> https://forums.modx.com/thread/43210/no-comments-yet-notice-for-comments-placeholder#dis-post-249427
Thanks for the fantastic work. I’m using Jot with placeholders to customize the arrangement of the different chunks. Currently, if there are no comments on a post, just the "Comments" header shows up with nothing underneath it. Is there a way to include a message like "No comments yet" in this case?

Wanted to ask in case there was an option I was missing before I started digging in to a workaround involving a separate snippet and the comment count.

Thanks,

Aaron]]>
https://forums.modx.com/thread/43210/no-comments-yet-notice-for-comments-placeholder#dis-post-249427 Thu, 30 Jun 2011 10:09:40 +0000 https://forums.modx.com/thread/43210/no-comments-yet-notice-for-comments-placeholder#dis-post-249427
<![CDATA[Ditto blog with Jot comments problem]]> https://forums.modx.com/thread/43377/ditto-blog-with-jot-comments-problem#dis-post-250060 This call in the Ditto blog container:
[[Ditto? &parents=`2` &paginate=`1` &display=`7` &tpl=`tpl_nyhet` &paginateAlwaysShowLinks= `1`]]


This is tpl_nyhet chunk:
<div id="aktbg">
<div id="akttitle"><div class="akt">[+title+]</div><div class="aktdate"> [+date+]</div>
[+phx:if=`[+namn+]`:isnt=``:then=`<div class="aktnamn">Av: [+namn+]</div>`:else=``:strip+]</div>
<div id="galleryDiv">
[+content+]
[+maxicall+]</div>
<div class="videothumbs">
<ul>
[+aktvideo+]
</ul>
</div>
{{jotcall}}
</div>


This is {{jotcall}} chunk:
[[Jot? &docid=`[+id+]` &placeholders=`1` &output=`0` &pagination=`2` &tplComments=`aktComments` &cssFile=`jot.css`]]
<div class="comments">
[+jot.html.comments+] 
[+jot.html.navigation+]
[+jot.html.moderate+]
[+jot.html.form+]
</div>


The Ditto blog works as expected and the Jot comments almost work except when i comment on either latest or second blog entry. The comment shows up in both first and second blog entry. If i comment on third or under, everything works.
Anyone?
UPDATE:
Just checked the source code of the blog page in a web browser, and saw that the first and second blog entry Jot form have the same id, the rest have unique ids. Why is that? They all use the same templates.
UPDATE 2:
It has something to do with placeholders...everything works if i remove this:
&placeholders=`1` &output=`0`

and this:
[+jot.html.comments+] 
[+jot.html.navigation+]
[+jot.html.moderate+]
[+jot.html.form+]

from {{jotcall}} chunk.
Very strange....]]>
https://forums.modx.com/thread/43377/ditto-blog-with-jot-comments-problem#dis-post-250060 Mon, 20 Jun 2011 03:53:01 +0000 https://forums.modx.com/thread/43377/ditto-blog-with-jot-comments-problem#dis-post-250060
<![CDATA[Jot Moderation Broken in Safari and Firefox]]> https://forums.modx.com/thread/43383/jot-moderation-broken-in-safari-and-firefox#dis-post-250070
Can anyone shed some light on this?

Here’s my code from the template....
[+phx:if=`[*id*]`:is=`104`:then=`{{Comments}}`:else=``+]


and Comments as a chunk looks like this:
<div id="commentsAnchor">
[[Jot?  &placeholders=`1` &output=`0`  &customfields=`name,email` &subscribe=`1`  &pagination=`10` &badwords=`badwords here` &canmoderate=`Site Admins` ]]
[+jot.html.comments+] 
[+jot.html.navigation+] 
<br><br>
[+jot.html.form+] 
[+jot.html.moderate+] 
</div>


I’ve got "cacheable" unchecked on the page that displays the comments.

Thanks!

]]>
https://forums.modx.com/thread/43383/jot-moderation-broken-in-safari-and-firefox#dis-post-250070 Thu, 16 Jun 2011 02:42:03 +0000 https://forums.modx.com/thread/43383/jot-moderation-broken-in-safari-and-firefox#dis-post-250070
<![CDATA[moderation comment: endless page loading]]> https://forums.modx.com/thread/43382/moderation-comment-endless-page-loading#dis-post-250069 I need some help with comment moderation... I’m going crazy! grin

Let me explain:
I have MODx Evolution 1.0.5 with Jot 1.1.4, pages are not cached, I have FriendlyURLs and my Jot call, included in {{comment}} chunk, is:

[[Jot? &captcha=`2` &moderated=`1` &customfields=`name,email` &validate=`name:Please enter your name,email:Please enter a valid e-mail address.:email` &pagination=`5`]]


It seems to work fine but when I try to edit or delete a comment, the page begins to reload and doesn’t stop untill I clear Firefox cache and cookies and I reload the page (obviously no changes are made).
If I don’t clear Firefox cache&cookies I can’t visit any page of site, it seems busy doing something...but what? huh

Please help me, I can’t understand what is the problem and I’m thinking about dropping MODx, but it would be a sad solution because I love MODx!!

Thanks
Giulia


Some additional info:
- web site: http://www.ortodicarta.eu/blog/uovo-nuovo/
- Server Apache
- PHP5

"Sorry for my English" smiley

]]>
https://forums.modx.com/thread/43382/moderation-comment-endless-page-loading#dis-post-250069 Tue, 26 Apr 2011 03:09:18 +0000 https://forums.modx.com/thread/43382/moderation-comment-endless-page-loading#dis-post-250069
<![CDATA[Count Customfields]]> https://forums.modx.com/thread/43381/count-customfields#dis-post-250067
I have some textarefields (Custom Jot Fields). Example:

Customfield 1 name = TextArea1
Customfield 2 name = TextArea2

First User write now a comment in the Customfield 1 but NOT in the Customfield 2
Second User write a comment in the Customfield 1 and 2

Total 3 comments

If it possible to count the filled custom fields? Along these lines:

[!Jot?&docid=`[*id*]`&action=`count-custom-comments` &fields=`TextArea1,TextArea2` !]

]]>
https://forums.modx.com/thread/43381/count-customfields#dis-post-250067 Thu, 21 Apr 2011 04:53:59 +0000 https://forums.modx.com/thread/43381/count-customfields#dis-post-250067