]> git.mxchange.org Git - friendica.git/commitdiff
quick comments
authorfriendica <info@friendica.com>
Thu, 16 Feb 2012 02:13:41 +0000 (18:13 -0800)
committerfriendica <info@friendica.com>
Thu, 16 Feb 2012 02:13:41 +0000 (18:13 -0800)
include/conversation.php
mod/oexchange.php
mod/smilies.php [new file with mode: 0755]
view/comment_item.tpl
view/head.tpl
view/theme/dispy/style.css
view/theme/duepuntozero/comment_item.tpl [new file with mode: 0755]
view/theme/loozah/comment_item.tpl [new file with mode: 0755]
view/theme/testbubble/comment_item.tpl
view/theme/testbubble/style.css

index 2ea9b603f2add9d8d784019f7d412802f532d5c5..3d13a1179882d6c269079c981e3adc62d47c6a88 100755 (executable)
@@ -522,8 +522,9 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                                if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
                                        }
 
-//                             $qcomment = array(':-)','LOL','ROTFL','[smile]');                               
-                                       $qcomment = null;
+
+                                       $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null);
+                                       $qcomment = (($qc) ? explode("\n",$qc) : null);
 
                                        if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
                                                $comment = replace_macros($cmnt_tpl,array(
index 53dce6446a2cbdaf722eb194f4390762e6c04c1e..72d2bcb9e4e5063e4c5756cf41dc7c56e1ecb933 100755 (executable)
@@ -11,8 +11,6 @@ function oexchange_init(&$a) {
                killme();
        }
 
-               
-
 
 }
 
@@ -28,14 +26,14 @@ function oexchange_content(&$a) {
                return;
        }
 
-       $url = (((x($_GET,'url')) && strlen($_GET['url'])) 
-               ? urlencode(notags(trim($_GET['url']))) : '');
-       $title = (((x($_GET,'title')) && strlen($_GET['title'])) 
-               ? '&title=' . urlencode(notags(trim($_GET['title']))) : '');
-       $description = (((x($_GET,'description')) && strlen($_GET['description'])) 
-               ? '&description=' . urlencode(notags(trim($_GET['description']))) : '');
-       $tags = (((x($_GET,'tags')) && strlen($_GET['tags'])) 
-               ? '&tags=' . urlencode(notags(trim($_GET['tags']))) : '');
+       $url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url'])) 
+               ? urlencode(notags(trim($_REQUEST['url']))) : '');
+       $title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title'])) 
+               ? '&title=' . urlencode(notags(trim($_REQUEST['title']))) : '');
+       $description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description'])) 
+               ? '&description=' . urlencode(notags(trim($_REQUEST['description']))) : '');
+       $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags'])) 
+               ? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
 
        $s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
 
diff --git a/mod/smilies.php b/mod/smilies.php
new file mode 100755 (executable)
index 0000000..c47f95d
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+function smilies_content(&$a) { return smilies('',true); }
index b29735227beab42d8202fd6f17a67f942281c01e..c992593f853deff2265bdc4d88d4ce527990bf17 100755 (executable)
                                        <a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
                                </div>
                                <div class="comment-edit-photo-end"></div>
-                               <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
                                {{ if $qcomment }}
                                {{ for $qcomment as $qc }}                              
                                        <span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
                                        &nbsp;
                                {{ endfor }}
                                {{ endif }}
+                               <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
 
                                <div class="comment-edit-text-end"></div>
                                <div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
index 70d830faa784956087eb9f99ff8b1bd804b01309..2a18370887dbd5e72c6c20650d1172730cedac5a 100755 (executable)
                        $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
                        openMenu("comment-edit-submit-wrapper-" + id);
                }
-               $("#comment-edit-text-" + id).val(tmpStr + $(obj).html());
+               var ins = $(obj).html();
+               ins = ins.replace('&lt;','<');
+               ins = ins.replace('&gt;','>');
+               ins = ins.replace('&amp;','&');
+               ins = ins.replace('&quot;','"');
+               $("#comment-edit-text-" + id).val(tmpStr + ins);
        }
 
        function showHideComments(id) {
index f2807b36f1c6ab4aff2c5ccf12e242a83de0960e..5bc1450db4f5df88decec9bb1d66a61a749e344b 100755 (executable)
@@ -1291,3 +1291,11 @@ footer { display: block; margin: 50px 20%; clear: both; }
 .acpopupitem.selected {
        color: #2e3436; background-color: #eeeeec;
 }
+.qcomment {
+       opacity: 0;
+       filter:alpha(opacity=0);
+}
+.qcomment:hover {
+       opacity: 1.0;
+       filter:alpha(opacity=100);
+}
diff --git a/view/theme/duepuntozero/comment_item.tpl b/view/theme/duepuntozero/comment_item.tpl
new file mode 100755 (executable)
index 0000000..b297352
--- /dev/null
@@ -0,0 +1,32 @@
+               <div class="comment-$wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
+                       <form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                               <input type="hidden" name="type" value="$type" />
+                               <input type="hidden" name="profile_uid" value="$profile_uid" />
+                               <input type="hidden" name="parent" value="$parent" />
+                               <input type="hidden" name="return" value="$return_path" />
+                               <input type="hidden" name="jsreload" value="$jsreload" />
+                               <input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
+
+                               <div class="comment-edit-photo" id="comment-edit-photo-$id" >
+                                       <a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
+                               </div>
+                               <div class="comment-edit-photo-end"></div>
+                               <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
+                               {{ if $qcomment }}
+                               {{ for $qcomment as $qc }}                              
+                                       <span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
+                                       &nbsp;
+                               {{ endfor }}
+                               {{ endif }}
+
+                               <div class="comment-edit-text-end"></div>
+                               <div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
+                                       <input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
+                                       <span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
+                                       <div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
+                               </div>
+
+                               <div class="comment-edit-end"></div>
+                       </form>
+
+               </div>
diff --git a/view/theme/loozah/comment_item.tpl b/view/theme/loozah/comment_item.tpl
new file mode 100755 (executable)
index 0000000..b297352
--- /dev/null
@@ -0,0 +1,32 @@
+               <div class="comment-$wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
+                       <form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                               <input type="hidden" name="type" value="$type" />
+                               <input type="hidden" name="profile_uid" value="$profile_uid" />
+                               <input type="hidden" name="parent" value="$parent" />
+                               <input type="hidden" name="return" value="$return_path" />
+                               <input type="hidden" name="jsreload" value="$jsreload" />
+                               <input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
+
+                               <div class="comment-edit-photo" id="comment-edit-photo-$id" >
+                                       <a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
+                               </div>
+                               <div class="comment-edit-photo-end"></div>
+                               <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
+                               {{ if $qcomment }}
+                               {{ for $qcomment as $qc }}                              
+                                       <span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
+                                       &nbsp;
+                               {{ endfor }}
+                               {{ endif }}
+
+                               <div class="comment-edit-text-end"></div>
+                               <div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
+                                       <input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
+                                       <span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
+                                       <div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
+                               </div>
+
+                               <div class="comment-edit-end"></div>
+                       </form>
+
+               </div>
index cad572f4ea5ae3466bdfbe7f22faddab5035e95d..bc75eb1a6762b4842f748f5ca606b83670b0e366 100755 (executable)
                                        <a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
                                </div>
                                <div class="comment-edit-photo-end"></div>
+                               {{ if $qcomment }}
+                               {{ for $qcomment as $qc }}                              
+                                       <span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
+                                       &nbsp;
+                               {{ endfor }}
+                               {{ endif }}
+
                                <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
 
                                <div class="comment-edit-text-end"></div>
index 118fc2e7ccf2e13f95cc4f0e06208ee90ed364d7..fcb7bea7a1feb32937139215e7b28e48e02bc34e 100755 (executable)
@@ -3259,3 +3259,12 @@ ul.menu-popup {
        background-color:#b20202; 
        order-bottom: none;
 }
+
+.qcomment {
+       opacity: 0;
+       filter:alpha(opacity=0);
+}
+.qcomment:hover {
+       opacity: 1.0;
+       filter:alpha(opacity=100);
+}