vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Profile Enhancements - Profile Commenting System (https://vborg.vbsupport.ru/showthread.php?t=145557)

eXtremeTim 04-28-2007 07:21 AM

good idea

TheMilkCarton 04-28-2007 08:46 AM

I've got the Standard editor implemented into this now. For some reason when you switch into WYSIWYG comments won't post, though. The standard editor is at least good enough for me. I've stripped it down and it's using it's own template so it takes up very little room.

Attachment 63728

It's at least easier than typing out all the BBcode by hand. You'll notice I got rid of the Font Size box and I'm not allowing images in comment posts. I'll allow images once I have a decent method of keeping all the images small enough to not stretch out the page.

If anyone at least wants to know how to get the standard editor implemented just reply to this and I'll type up the code. I don't really want to take the time to make this into a product because I have a lot of custom code in my templates I'd need to get rid of first. :down:

Also, if anyone wants to help figure out why WYSIWYG comments show up blank, then that'd be great, too. :)

bazzup 04-28-2007 08:57 AM

got this working nice little touch

where in the templates would i put it so it shows up like yours tim?? on the right hand side of profile

eXtremeTim 04-28-2007 09:13 AM

Quote:

Originally Posted by TheMilkCarton (Post 1236908)
I've got the Standard editor implemented into this now. For some reason when you switch into WYSIWYG comments won't post, though. The standard editor is at least good enough for me. I've stripped it down and it's using it's own template so it takes up very little room.

Attachment 63728

It's at least easier than typing out all the BBcode by hand. You'll notice I got rid of the Font Size box and I'm not allowing images in comment posts. I'll allow images once I have a decent method of keeping all the images small enough to not stretch out the page.

If anyone at least wants to know how to get the standard editor implemented just reply to this and I'll type up the code. I don't really want to take the time to make this into a product because I have a lot of custom code in my templates I'd need to get rid of first. :down:

Also, if anyone wants to help figure out why WYSIWYG comments show up blank, then that'd be great, too. :)

Could you hook me up with the code to save me some time from having to make it myself for the ajax version of the hack?

eXtremeTim 04-28-2007 09:15 AM

Quote:

Originally Posted by bazzup (Post 1236913)
got this working nice little touch

where in the templates would i put it so it shows up like yours tim?? on the right hand side of profile

My templates are custom made by me. So I doubt you have the same template that I do. ;) You will just have to play around with your style till you get it where you want.

TheMilkCarton 04-28-2007 10:22 AM

Quote:

Originally Posted by eXtremeTim (Post 1236919)
Could you hook me up with the code to save me some time from having to make it myself for the ajax version of the hack?

I got it all from this Article

-------------------
Adding Standard text editor to comments system

Manual method -- Skip below for an updated product

Add Plugin under your product: Comment Editor Toolbar @ editor_toolbar_start
PHP Code:

if (THIS_SCRIPT == 'member')
{
global 
$setting;
$setting['allow_bbcode'] = '1';
$show['img_bbcode'] = $setting['allow_imgcode'];
$toolbartype $setting['allow_bbcode'] ? is_wysiwyg_compatible(1$editor_type) : 0;
$show['wysiwyg_compatible'] = (is_wysiwyg_compatible(1$editor_type) == 0);
$show['editor_toolbar'] = ($toolbartype 0);
$editor_template_name = ($toolbartype 'comment_editor_toolbar_on' 'editor_toolbar_off');


Add to Member Commenting System plugin:
PHP Code:

require_once(DIR '/includes/functions_editor.php');
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
$istyles_js construct_editor_styles_js();
$show['qr_require_click'] = 0;
$editorid construct_edit_toolbar(''0'', ($setting['allow_smilies'] ? 0), 1false'fe');
$messagearea "
<script type=\"text/javascript\">
<!--
    var require_click = false;
    var threaded_mode = 1;
    var is_last_page = false;
// -->
</script>
$messagearea
"
;
require_once(
'./includes/functions_wysiwyg.php');
$messageconvert_wysiwyg_html_to_bbcode($vbulletin->GPC['message']);
$message $vbulletin->db->escape_string($message); 

Create template: comment_editor_toolbar_on (if you want a different name you must change
Code:

$vBeditTemplate[clientscript]

<div id="$editorid" class="vBulletin_editor">

    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td id="{$editorid}_controls" class="controlbar" colspan="2">

            <table cellpadding="0" cellspacing="0" border="0">
            <tr>
            <if condition="$show['font_bbcode'] OR $show['size_bbcode']">
            </if>
            <if condition="$show['font_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_popup_fontname" title="$vbphrase[fonts]">
                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td class="popup_feedback"><div id="{$editorid}_font_out" style="width:91px">&nbsp;</div></td>
                        <td class="popup_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.gif" width="11" height="16" alt="" /></td>
                    </tr>
                    </table>               
                </div></td>
            </if>
            <if condition="$show['color_bbcode']">
                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
                <td><div class="imagebutton" id="{$editorid}_popup_forecolor" title="$vbphrase[colors]">
                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td id="{$editorid}_color_out"><img src="$stylevar[imgdir_editor]/color.gif" width="21" height="16" alt="" /><br /><img src="$vboptions[cleargifurl]" id="{$editorid}_color_bar" alt="" style="background-color:black" width="21" height="4" /></td>
                        <td class="alt_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.gif" width="11" height="16" alt="" /></td>
                    </tr>
                    </table>
                </div></td>
            </if>
            <if condition="$show['basic_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_cmd_bold"><img src="$stylevar[imgdir_editor]/bold.gif" width="21" height="20" alt="$vbphrase[bold]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_italic"><img src="$stylevar[imgdir_editor]/italic.gif" width="21" height="20" alt="$vbphrase[italic]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_underline"><img src="$stylevar[imgdir_editor]/underline.gif" width="21" height="20" alt="$vbphrase[underline]" /></div></td></if>
<if condition="$show['align_bbcode']">
<if condition="$stylevar['textdirection'] == 'ltr'">
<td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.gif" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.gif" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.gif" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
                <else />
                <td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.gif" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.gif" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.gif" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
                </if>
                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
            </if>
       
            <if condition="$show['url_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_cmd_createlink"><img src="$stylevar[imgdir_editor]/createlink.gif" width="21" height="20" alt="$vbphrase[insert_link]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_unlink"><img src="$stylevar[imgdir_editor]/unlink.gif" width="21" height="20" alt="$vbphrase[remove_link]" /></div></td>
            </if>
            <if condition="$show['img_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_cmd_insertimage"><img src="$stylevar[imgdir_editor]/insertimage.gif" width="21" height="20" alt="$vbphrase[insert_image]" /></div></td>
            </if>
<td><div class="imagebutton">
<a href="#" onclick="vB_Editor['$editorid'].open_smilie_window(smiliewindow_x, smiliewindow_y); return false"><img src="./images/editor/smilie.gif"  alt="Smilies" border="0" target="_blank" ></a></div>
</td>
                <td align="right">
                    <div class="imagebutton" id="{$editorid}_cmd_resize_0_100"><img src="$stylevar[imgdir_editor]/resize_0.gif" width="21" height="9" alt="$vbphrase[decrease_size]" /></div>
                    <div class="imagebutton" id="{$editorid}_cmd_resize_1_100"><img src="$stylevar[imgdir_editor]/resize_1.gif" width="21" height="9" alt="$vbphrase[increase_size]" /></div>
                </td>
            <if condition="$show['wysiwyg_compatible']">
                <td><div class="imagebutton" id="{$editorid}_cmd_switchmode"><img src="$stylevar[imgdir_editor]/switchmode.gif" width="21" height="20" alt="$vbphrase[switch_editor_mode]" /></div></td>
            </if>
            </tr>
            </table>
           
        </td>
    </tr>
    <tr valign="top">
<td class="controlbar">

<textarea name="comment" id="{$editorid}_textarea" rows="10" cols="60" style="width:415px; height:{$editor_height}px;" tabindex="1">$newpost[message]</textarea></td>
    </tr>

    </tr>
    </table>

</div>

<input type="hidden" name="wysiwyg" id="{$editorid}_mode" value="$editortype" />

<script type="text/javascript">
<!--
vB_Editor['$editorid'] = new vB_Text_Editor('$editorid', $editortype, '$forumid', '$parsesmilie');
//-->
</script>

Some of the image sizes may be wrong, I had made bigger editor buttons and changed the sizes, so I'm not sure I changed all of them back for this code. Also, if the editor needs to be in a thinner column, "415px" will need to be changed, and the buttons will have to make another row.

Find:
Code:

<textarea class="bginput" name="comment" rows="4" cols="40" tabindex="1" /></textarea>
and
Replace with:
Code:

$messagearea
--------------------------
Updated product with all the above edits included (I can't guarantee this will work for everyone, but it installed fine on a clean install test board)
Attachment 63736
If anyone can get WYSIWYG WORKING, please do and SHARE.

The newest version of this product is changed from the one I'm using, so I'm not guaranteeing this will work 100%. Also, looking at the new XML file, I can see my "Viewing X of X Comments" did make it into the product, so can I be made a contributor or whatever it is called? ;)

Edit: Note that this version doesn't have any IMG buttons, but that's because I'm using this in a column that's very thin so I'm not allowing images (IMG bbcode can technically still be typed out though). It shouldn't be that hard to add it back in, but good luck anyway. :)

tamborinegal 04-30-2007 04:28 AM

Quote:

Originally Posted by ZomgStuff (Post 1235602)
Please make it so it PM's the user once they have been left a comment ;)

Quote:

Originally Posted by eXtremeTim (Post 1235613)
That feature can be added into the que of what needs done. :)

Great hack Tim. I love it! Thank you. Just wondering, did the PM on comment feature make it into the latest release?

Also can moderators delete comments or is it only the member and the admin that have permission to do that?

Cheers

Clancy

Terminatoronly 04-30-2007 06:24 AM

Is it done with Ajax?

TheMilkCarton 04-30-2007 12:15 PM

Can someone explain the interest in AJAX? MySpace doesn't use AJAX to post comments.. and I think Facebook just started using AJAX.

I don't think AJAX adds anything to this mod because it's quite easy to add a comment already. You click "Post Comment" and then it simply reloads the page. Wouldn't AJAX be more server intensive than this anyway? I always hear everyone hating on the Shoutbox, which would essentially be what this Profile Comment System is if it were to include AJAX.

eXtremeTim 04-30-2007 12:42 PM

I will have an ajax version out soon enough.

elmati 04-30-2007 01:37 PM

Quote:

Originally Posted by TheMilkCarton (Post 1236822)
eXtremeTim --
Also, did you ever incorporate the "add-on" I released on the first page of this thread? A user requested a "Viewing X of X Comments" in the user's profile. I thought it was a nice addition, but you obviously don't have to add it if it's not your thing :)

i incorporate your addon on my xml as soon as you posted :)
i think its on the new xml updated by extremTim

vspro 04-30-2007 02:03 PM

I think have a count for total comments of a user in posbit or navbar ...

rabbits slayer 04-30-2007 02:30 PM

Quote:

Originally Posted by tamborinegal (Post 1238012)
Great hack Tim. I love it! Thank you. Just wondering, did the PM on comment feature make it into the latest release?

I'd like to know that as well. Thanks. :)

tamborinegal 05-01-2007 06:10 AM

Quote:

Originally Posted by rabbits slayer (Post 1238240)
I'd like to know that as well. Thanks. :)

I just installed the latest release and it doesn't look like the PM on comment did make it in.

Also Tim, I don't know if you're aware of it or not, but when you don't type anything into the comment field and click submit, it shows this error - Could not find phrase 'error_requiredfields'.

Is there any way you could add in a "are you sure you want to delete this comment" page. I can easily imagine accidentally deleting a comment the way it is.

Thanks again for releasing this.

Clancy

eXtremeTim 05-01-2007 06:37 AM

I will fix the required fields problem in the ajax release.

Confirm delete page will hopefully make it into the next version depends on what I get done in what order.

tamborinegal 05-01-2007 06:42 AM

Quote:

Originally Posted by eXtremeTim (Post 1238735)
I will fix the required fields problem in the ajax release.

Confirm delete page will hopefully make it into the next version depends on what I get done in what order.

Thanks Tim. Are you planning on adding the the PM on comment in the next release too or or is that a while away.

Clancy

ZomgStuff 05-04-2007 12:50 AM

Quote:

Originally Posted by tamborinegal (Post 1238739)
Thanks Tim. Are you planning on adding the the PM on comment in the next release too or or is that a while away.

Clancy

Ah, I think this would be one of the most important things.

ZomgStuff 05-04-2007 01:15 AM

This is one way to add the PM thing. I haven't done php in forever, but I know this wouldn't be too hard.

Some material to reference off,
https://vborg.vbsupport.ru/showthread.php?t=120186

There was also another thread about it, but I can't find it right now.

eXtremeTim 05-04-2007 01:29 AM

I will add that into the next release.

Terminatoronly 05-04-2007 09:39 AM

is this version with ajax or still?

eXtremeTim 05-04-2007 10:18 AM

no ajax yet.

PinkDaisy 05-04-2007 03:34 PM

Sweet! Gonna install today.. this would be even better if it sent you an auto PM when you got a comment!! :D

romanticyao 05-04-2007 06:54 PM

how come it adds 1 querie to memberprofile for each comment given??? if i have 10, it will add 10 queries....

Chicago_VLNU_4s 05-04-2007 08:49 PM

Interesting... too bad I already bought stangstas version :/

eXtremeTim 05-05-2007 07:52 AM

Quote:

Originally Posted by PinkDaisy (Post 1241394)
Sweet! Gonna install today.. this would be even better if it sent you an auto PM when you got a comment!! :D

Will be added into next version.

Romanticyao: ill take a look at that.

deezelpope 05-05-2007 09:45 AM

Oh sweet...that ROCKS!!!:up:

PinkDaisy 05-05-2007 10:54 AM

Quote:

Originally Posted by eXtremeTim (Post 1241782)
Will be added into next version.

Romanticyao: ill take a look at that.

Woohoo!! Thanks.. :D

Zweeper 05-05-2007 02:28 PM

is there a way to install it on 3.5.4?

I get this error when i trie to import the product.
It will be nice when somebode could help me! =)

Quote:

Datenbankfehler in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'User Commenting Cache', 'cache_templates', 'if (THIS_SCRIPT == \'member\')\r\n{\r\n $globaltemplates = array_merge($globaltemplates, array(\'ewt_memberprofile_commentbits\', \'ewt_memberprofile_morecommentbits\', \'ewt_memberprofile_nocommentbits\', \'ewt_memberprofile_guestbook\'));\r\n}', 'ewt_profilecomments');

MySQL-Fehler : Unknown column 'executionorder' in 'field list'
Fehler-Nr. : 1054


Zweeper 05-06-2007 01:46 PM

*push* :(

rossco_2005 05-06-2007 01:54 PM

To install it on 3.5 you need to remove the part that goes
Code:

executionorder="5"

Zweeper 05-06-2007 04:10 PM

you mean this code?

<plugin active="1" executionorder="5">
<title>User Commenting Cache</title>
<hookname>cache_templates</hookname>
<phpcode><![CDATA[if (THIS_SCRIPT == 'member')

eXtremeTim 05-06-2007 04:32 PM

yep thats the code remove executionorder="5"

mrmike 05-06-2007 04:35 PM

Great hack, thanx!

A nice feature would be a forumhome "Latest post in guestbook" :up:

rabbits slayer 05-09-2007 05:21 PM

Anyway users or mods can delete their own comments posted on other members page?

Mrdby 05-12-2007 02:57 AM

3.6.6?

rabbits slayer 05-12-2007 03:42 AM

Mine works fine on 3.6.6

Mrdby 05-12-2007 12:17 PM

can i edit options for this under the vbull options section? If so where is it found?

EWGF 05-21-2007 06:50 PM

Not yet.

Installed, nice and easy.

BozzaJos 05-22-2007 03:28 PM

It's been a while since a last update. How's everything going with this hack Tim? How's the AJAX part going and do you already have an ETA for the next release?

Living in music 05-24-2007 07:53 AM

Don't have update since 28. Apr 2007 ...


All times are GMT. The time now is 12:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.32015 seconds
  • Memory Usage 1,892KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete