vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   New Posting Features - Canned Replies - User Saved Text for Replies, Threads, PMs & Infractions (https://vborg.vbsupport.ru/showthread.php?t=187043)

Stifmeister2 04-09-2009 04:20 PM

Banana I need help in two things:

1) How do I make it that it shows the link in UserCP only to those usergroups that can use Canned replies? I have that "Icons for UserCP" modification and I did the manual template edit but the link is showing for everyone. I need some kind of if-conditional to only show it to allowed people.

2) How can I make it to use the edited UserCP shell also when I'm on cannedreplies.php ??
See the screens for better explanation.

1. My usercp shell after manually adding the link:
https://vborg.vbsupport.ru/external/2009/04/112.jpg


2. After clicking "Edit Canned Replies" ( = being in cannedreplies.php):
https://vborg.vbsupport.ru/external/2009/04/113.jpg

Stifmeister2 04-09-2009 11:06 PM

Ok I managed to do #1 myself, just added this if condition:

Code:

<if condition="$permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']">

[the link here]

</if>


But I still need your help for the second request. I need those icons for the UserCP even whem I'm on cannedreplies.php page.

bananalive 04-10-2009 02:07 PM

Quote:

Originally Posted by Stifmeister2 (Post 1787785)
Ok I managed to do #1 myself, just added this if condition:

Code:

<if condition="$permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']">

[the link here]

</if>


But I still need your help for the second request. I need those icons for the UserCP even whem I'm on cannedreplies.php page.

Import/ upload attached files

Stifmeister2 04-10-2009 08:59 PM

Quote:

Originally Posted by bananalive (Post 1788210)
Import/ upload attached files

Will do. :)



---edit---

The UserCP shell is still the default one whem I'm on cannedreplies.php page. Which template should I edit to make it with the icons?


The template I need it to use is 'USERCP_SHELL_ICONS' not 'USERCP_SHELL' like usually.

bananalive 04-11-2009 10:10 AM

Quote:

Originally Posted by Stifmeister2 (Post 1788477)
Will do. :)



---edit---

The UserCP shell is still the default one whem I'm on cannedreplies.php page. Which template should I edit to make it with the icons?


The template I need it to use is 'USERCP_SHELL_ICONS' not 'USERCP_SHELL' like usually.

Open cannedreplies.php and replace all USERCP_SHELL with USERCP_SHELL_ICONS

Stifmeister2 04-11-2009 08:48 PM

Quote:

Originally Posted by bananalive (Post 1788794)
Open cannedreplies.php and replace all USERCP_SHELL with USERCP_SHELL_ICONS

Will do, thx. :)

Keesa 04-13-2009 10:10 PM

:up: :up: :up: :up: :up: :up: :up:

AWESOME!

Simon Lloyd 04-16-2009 06:16 AM

Bananalive, if it won't take up too much of your time could you look at making the canned reply insert rather than overwrite?, the problem is if i quote a post then click a canned reply it overwrites the quoted post, right now i copy the post add the canned reply then paste the post back, i didn't mind at first but it's becoming a pain to do now :(

If it is a lot of work/trouble then don't worry.

bananalive 04-17-2009 02:26 PM

Quote:

Originally Posted by Simon Lloyd (Post 1792249)
Bananalive, if it won't take up too much of your time could you look at making the canned reply insert rather than overwrite?, the problem is if i quote a post then click a canned reply it overwrites the quoted post, right now i copy the post add the canned reply then paste the post back, i didn't mind at first but it's becoming a pain to do now :(

If it is a lot of work/trouble then don't worry.

It depends on the browser whether it replaces it or inserts it.

Simon Lloyd 04-18-2009 02:02 PM

i thought that but i use both firefox and IE and when quoting a post using the quote button or typing anything in the reply box it will be entirely replaced by the canned reply when you click canned reply,

Like i said if its a pain don't waste your time over it!

bigcurt 04-28-2009 10:42 AM

That is weird. I have never noticed that before.

bananalive 05-02-2009 02:57 PM

Quote:

Originally Posted by Simon Lloyd (Post 1793922)
i thought that but i use both firefox and IE and when quoting a post using the quote button or typing anything in the reply box it will be entirely replaced by the canned reply when you click canned reply,

Like i said if its a pain don't waste your time over it!

I've tested this in firefox:

template cr_js:
Code:

<script language="javascript" type="text/javascript">
function storeCaret (textEl) {
        if (textEl.createTextRange)
                textEl.caretPos = document.selection.createRange().duplicate();
                }
function insertAtCaret (text) {
text = text.replace(/\\"/ig, "\"");
var textb = text;
text = text.replace(/ \<br\>/ig, "");
var o = document.getElementById("{$editorid}_iframe");
if (o) {
document.getElementById("{$editorid}_iframe").contentWindow.document.body.innerHTML += textb;
}
        if (document.vbform.message.createTextRange && document.vbform.message.caretPos) {
                var caretPos = document.vbform.message.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
                }
              else
                        document.vbform.message.value += text;
   
    document.vbform.message.focus();
    setCursorPosition(document.vbform.message,document.vbform.message.value.lastIndexOf(text)+3,1);
    }
function setCursorPosition(oInput,oStart,oEnd) {
                  if( oInput.setSelectionRange ) {
                    oInput.setSelectionRange(oStart,oEnd);
            }
            else if( oInput.createTextRange ) {
                var range = oInput.createTextRange();
                range.collapse(true);
                range.moveEnd('character',oEnd);
                range.moveStart('character',oStart);
                range.select();
            }
      }
function showOutput(){
if (o) {
document.getElementById("{$editorid}_iframe").contentWindow.document.body.innerHTML += textb;
}
document.getElementById('msgOutput').innerHTML += document.vbform.message.value;
}
</script>


Simon Lloyd 05-02-2009 07:54 PM

Just added that to a test style and tried it out in IE 7 - Worked like a charm!

Thanks very much for looking in to it and solving the issue, answering posts just became a whole lot easier :)

Simon Lloyd 05-05-2009 09:10 AM

Quote:

Originally Posted by Simon Lloyd (Post 1803231)
Just added that to a test style and tried it out in IE 7 - Worked like a charm!

Thanks very much for looking in to it and solving the issue, answering posts just became a whole lot easier :)

Bananalive, i can confirm this works with IE7, Firefox, Google Chrome, it also works with these OS's Ubuntu, Windows and MAC.

Again, thanks for taking the time to create this fix!

Stifmeister2 05-05-2009 06:53 PM

Quote:

Originally Posted by Simon Lloyd (Post 1804905)
Bananalive, i can confirm this works with IE7, Firefox, Google Chrome, it also works with these OS's Ubuntu, Windows and MAC.

Again, thanks for taking the time to create this fix!

Same here, thanks for the fix Banana. ;)

Arbit3r 05-12-2009 06:40 PM

Anyone know if this works for 3.8.x? Im getting this error when trying to set permissions.



Code:

Database error in vBulletin 3.8.2:

Invalid SQL:
UPDATE vb_usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        `title` = '<!-- Order=\"1\" -->Administrators',
        `description` = '',
        `usertitle` = 'Administrator',
        `opentag` = '<B><font color=\"red\">',
        `closetag` = '</font></B>',
        `passwordexpires` = '180',
        `passwordhistory` = '360',
        `cannedreplies` = '1',
        `maxcr` = '8',
        `ecdownloadpermissions` = '32767',
        `ecexcludecatlist` = '',
        `ecdownloadsmaxuploadtotal` = '-1',
        `ecdownloadsmaxdailydl` = '-1',
        `ecdownloadsmaxdailyfiles` = '-1',
        `ecdownloaddelaygrp` = '-1',
        `moderatepm_permissions` = '4',
        `pmquota` = '5000',
        `pmpermissions` = '7',
        `pmsendmax` = '5',
        `pmthrottlequantity` = '0',
        `forumpermissions` = '16777215',
        `genericpermissions` = '2147483583',
        `attachlimit` = '0',
        `calendarpermissions` = '63',
        `wolpermissions` = '31',
        `adminpermissions` = '3',
        `genericpermissions2` = '1',
        `genericoptions` = '63',
        `profilepicmaxwidth` = '350',
        `profilepicmaxheight` = '400',
        `profilepicmaxsize` = '999999999',
        `avatarmaxwidth` = '100',
        `avatarmaxheight` = '100',
        `avatarmaxsize` = '999999999',
        `signaturepermissions` = '245759',
        `sigpicmaxwidth` = '650',
        `sigpicmaxheight` = '200',
        `sigpicmaxsize` = '999999999',
        `sigmaxrawchars` = '0',
        `sigmaxchars` = '0',
        `sigmaxlines` = '0',
        `sigmaxsizebbcode` = '7',
        `sigmaximages` = '0',
        `albumpermissions` = '255',
        `albumpicmaxwidth` = '600',
        `albumpicmaxheight` = '600',
        `albumpicmaxsize` = '100000',
        `albummaxpics` = '100',
        `albummaxsize` = '0',
        `usercsspermissions` = '63',
        `visitormessagepermissions` = '63',
        `socialgrouppermissions` = '65535',
        `maximumsocialgroups` = '5',
        `groupiconmaxsize` = '999999999',
        `mgc_cb_evo_permissions` = '0',
        `mgc_cb_evo_nbmsg_show` = '',
        `mgc_cb_evo_nbmsg_perday_show` = '',
        `arcadepermissions` = '255',
        `minpoststoplay` = '0',
        `minreptoplay` = '-1000',
        `minreglengthtoplay` = '0'
WHERE usergroupid=6;

MySQL Error  : Unknown column 'mgc_cb_evo_permissions' in 'field list'
Error Number  : 1054
Request Date  : Tuesday, May 12th 2009 @ 09:34:48 PM
Error Date    : Tuesday, May 12th 2009 @ 09:34:48 PM
Script        : http://movie-forumz.org/admincp/usergroup.php?do=update
Referrer      : http://movie-forumz.org/admincp/usergroup.php?do=edit&usergroupid=6
IP Address    : 82.33.12.57
Username      : ***
Classname    : vB_Database_MySQLi
MySQL Version : 5.0.51a-24+lenny1


bananalive 05-14-2009 10:42 AM

Quote:

Originally Posted by Arbit3r (Post 1809541)
Anyone know if this works for 3.8.x? Im getting this error when trying to set permissions.



Code:

Database error in vBulletin 3.8.2:

Invalid SQL:
UPDATE vb_usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        `title` = '<!-- Order=\"1\" -->Administrators',
        `description` = '',
        `usertitle` = 'Administrator',
        `opentag` = '<B><font color=\"red\">',
        `closetag` = '</font></B>',
        `passwordexpires` = '180',
        `passwordhistory` = '360',
        `cannedreplies` = '1',
        `maxcr` = '8',
        `ecdownloadpermissions` = '32767',
        `ecexcludecatlist` = '',
        `ecdownloadsmaxuploadtotal` = '-1',
        `ecdownloadsmaxdailydl` = '-1',
        `ecdownloadsmaxdailyfiles` = '-1',
        `ecdownloaddelaygrp` = '-1',
        `moderatepm_permissions` = '4',
        `pmquota` = '5000',
        `pmpermissions` = '7',
        `pmsendmax` = '5',
        `pmthrottlequantity` = '0',
        `forumpermissions` = '16777215',
        `genericpermissions` = '2147483583',
        `attachlimit` = '0',
        `calendarpermissions` = '63',
        `wolpermissions` = '31',
        `adminpermissions` = '3',
        `genericpermissions2` = '1',
        `genericoptions` = '63',
        `profilepicmaxwidth` = '350',
        `profilepicmaxheight` = '400',
        `profilepicmaxsize` = '999999999',
        `avatarmaxwidth` = '100',
        `avatarmaxheight` = '100',
        `avatarmaxsize` = '999999999',
        `signaturepermissions` = '245759',
        `sigpicmaxwidth` = '650',
        `sigpicmaxheight` = '200',
        `sigpicmaxsize` = '999999999',
        `sigmaxrawchars` = '0',
        `sigmaxchars` = '0',
        `sigmaxlines` = '0',
        `sigmaxsizebbcode` = '7',
        `sigmaximages` = '0',
        `albumpermissions` = '255',
        `albumpicmaxwidth` = '600',
        `albumpicmaxheight` = '600',
        `albumpicmaxsize` = '100000',
        `albummaxpics` = '100',
        `albummaxsize` = '0',
        `usercsspermissions` = '63',
        `visitormessagepermissions` = '63',
        `socialgrouppermissions` = '65535',
        `maximumsocialgroups` = '5',
        `groupiconmaxsize` = '999999999',
        `mgc_cb_evo_permissions` = '0',
        `mgc_cb_evo_nbmsg_show` = '',
        `mgc_cb_evo_nbmsg_perday_show` = '',
        `arcadepermissions` = '255',
        `minpoststoplay` = '0',
        `minreptoplay` = '-1000',
        `minreglengthtoplay` = '0'
WHERE usergroupid=6;

MySQL Error  : Unknown column 'mgc_cb_evo_permissions' in 'field list'
Error Number  : 1054
Request Date  : Tuesday, May 12th 2009 @ 09:34:48 PM
Error Date    : Tuesday, May 12th 2009 @ 09:34:48 PM
Script        : http://movie-forumz.org/admincp/usergroup.php?do=update
Referrer      : http://movie-forumz.org/admincp/usergroup.php?do=edit&usergroupid=6
IP Address    : 82.33.12.57
Username      : ***
Classname    : vB_Database_MySQLi
MySQL Version : 5.0.51a-24+lenny1


Error with mgc chatbox

Arbit3r 05-16-2009 03:36 PM

Ah, i did not see that down there. I've been having allot of issues with that MGC chatbox. Thanks for the help.

Arbit3r 05-18-2009 09:18 PM

Another question. I seem to be having issues with "Shared Canned Replies" When a canned reply is selected that has been added by another user or "Shared" nothing comes up in the text box and the drop down menu becomes blank.

Any help appreciated.

-Raf

Simon Lloyd 05-19-2009 04:58 PM

Quote:

Originally Posted by Arbit3r (Post 1813164)
Another question. I seem to be having issues with "Shared Canned Replies" When a canned reply is selected that has been added by another user or "Shared" nothing comes up in the text box and the drop down menu becomes blank.


Any help appreciated.


-Raf

Shared replies are shared by using {shared}, whichever user shares them everyone who has access to use canned replies can use them, any personal canned replies not shared remain hidden from everyone else.

imported_silkroad 05-23-2009 01:22 PM

Sorry if this has been asked before, but I had trouble searching because of the test in the error message:

Quote:

Could not find phrase ''.
We are running 3.4.1 ... has anyone seen the error above? How to fix it?

Thanks!

imported_silkroad 05-23-2009 01:34 PM

(deleted) See post below.

imported_silkroad 05-23-2009 01:44 PM

Quote:

Originally Posted by Simon Lloyd (Post 1813584)
Shared replies are shared by using {share}, whichever user shares them everyone who has access to use canned replies can use them, any personal canned replies not shared remain hidden from everyone else.

I prefixed our replies (the name of the canned reply) with {share} and it is not sharing. Just installed version

vb_cannedreplies2008 v2.5.6

Any clues?

bananalive 05-23-2009 02:21 PM

Quote:

Originally Posted by Arbit3r (Post 1813164)
Another question. I seem to be having issues with "Shared Canned Replies" When a canned reply is selected that has been added by another user or "Shared" nothing comes up in the text box and the drop down menu becomes blank.


Any help appreciated.


-Raf

Import attached file

bananalive 05-23-2009 02:21 PM

Quote:

Originally Posted by imported_silkroad (Post 1815755)
I prefixed our replies (the name of the canned reply) with {share} and it is not sharing. Just installed version

vb_cannedreplies2008 v2.5.6

Any clues?

When editing the canned reply, check the tickbox
Share: Share reply with other users who can use Canned Replies
And import product file from post above

imported_silkroad 05-23-2009 02:53 PM

Quote:

Originally Posted by bananalive (Post 1815766)
When editing the canned reply, check the tickbox
Share: Share reply with other users who can use Canned Replies
And import product file from post above

Thanks, will try it.

OBTW, the earlier version...

Quote:

Originally Posted by ourteam
It needs to go in the text not the title, a little bit of query running sorted that out.

Actually I think the way it works is a little counter-intuitive, and the title would be a better place than the reply text.

I'll give the new version a try.

Cheers and thanks.

imported_silkroad 05-23-2009 02:56 PM

FYI:

Quote:

vBulletin Message


The following dependencies were not met:

1. This product is not compatible with version 3.7.4 of vBulletin. (Compatible starting with 3.8.0)

imported_silkroad 05-23-2009 03:00 PM

This is the same product??
Quote:

File Type: xml product-articleforum-v1.6.xml (91.8 KB, 2 views)
I don't think this is the right file, is it?

imported_silkroad 05-23-2009 03:05 PM

Basically,

The version we just installed:

Quote:

<title>Canned Replies</title>

<description>Save standard post replies</description>

<version>2.5.5</version>

Shares CRs only if you put the tag {share} in the text of the message.

We kindly suggest you should either

(1) Have a check box (variable) or
(2) At least put {share} in the title (not the body) of message.

(1) is better.. Simply create a tick box and get rid of the {share} thing... thanks!

imported_silkroad 05-23-2009 03:19 PM

In the absence of a good sharing solution, we simply cut this out of the code:

Quote:

WHERE userid=$userid || reply LIKE '{share}%' || reply LIKE '{share}%'
A tick box when creating a canned reply would be the best, me suggests :D

bananalive 05-23-2009 03:34 PM

Quote:

Originally Posted by imported_silkroad (Post 1815794)
This is the same product??


I don't think this is the right file, is it?

No, this should be right file now

imported_silkroad 05-23-2009 03:54 PM

Quote:

Originally Posted by bananalive (Post 1815815)
No, this should be right file now

Thanks. However, that one does not work. In 3.7.4 it breaks the page formatting on page:

/cannedreplies.php

Cheers.

imported_silkroad 05-23-2009 03:59 PM

This latest version <version>2.5.6</version> still has this "shared" code:

Quote:

userid=$userid || reply LIKE '___share___%' || reply LIKE '___share___%
Could you please release a clean, working version that does not have this "share" requirement (using the world share in the text), but a configuration switch?

Also, this version (mentioned earlier) breaks our page formatting, FYI, and does not work property with 3.7.4, FYI.

H3C x Nevz 05-29-2009 12:05 AM

Big fan of your mods, bananalive. I think a nice feature for the future would be an additional field when editing your canned replies, to show notes for usage. Then, when someone selects that canned reply, the notes for usage appear inline in italics. I know a lot of people use this mod so that admins & moderators can post notices or infractions and they need to know how to use the forms.

Simon Lloyd 05-30-2009 08:41 PM

Quote:

Originally Posted by bananalive (Post 1815766)
When editing the canned reply, check the tickbox
Share: Share reply with other users who can use Canned Replies
And import product file from post above

Is that file an upgraded version for 3.8.2?, does it mean that we would no longer need to use {share}?

bananalive 06-02-2009 04:04 PM

Quote:

Originally Posted by Simon Lloyd (Post 1820283)
Is that file an upgraded version for 3.8.2?, does it mean that we would no longer need to use {share}?

No. At some point, I will redo all the code for vbulletin 3.8.x - although it already works with 3.8.x it needs cleaning up and improving a bit.

Yes the {share} has been replaced by a simple check box option when editing the canned reply.

Simon Lloyd 06-04-2009 06:32 AM

Quote:

Originally Posted by bananalive (Post 1822107)
No. At some point, I will redo all the code for vbulletin 3.8.x - although it already works with 3.8.x it needs cleaning up and improving a bit.

Yes the {share} has been replaced by a simple check box option when editing the canned reply.

Bananalive, if i import the xml in this post https://vborg.vbsupport.ru/showpost....&postcount=231 (just a couple of posts up from here) will i have to change all the canned replies that have {share} to a check in the check box? or will i loose those canned replies and have to recreate them?

By the way i am using vb3.8.2 and i have not experienced any problems since you fixed the inserting the CR rather than overwrite everything in the reply box :)

bananalive 06-04-2009 09:10 AM

Quote:

Originally Posted by Simon Lloyd (Post 1823177)
Bananalive, if i import the xml in this post https://vborg.vbsupport.ru/showpost....&postcount=231 (just a couple of posts up from here) will i have to change all the canned replies that have {share} to a check in the check box? or will i loose those canned replies and have to recreate them?

By the way i am using vb3.8.2 and i have not experienced any problems since you fixed the inserting the CR rather than overwrite everything in the reply box :)

During upgrade you will not lose any canned replies. You will however need to edit canned replies which you wish to share, by editing them and checking the share box.

Simon Lloyd 06-07-2009 10:42 AM

Bananalive i imported the xml found here https://vborg.vbsupport.ru/showpost....&postcount=231 (i did overwrite!) but when i go to edit my canned replies i get a white page with all the canned replies on and no way of editing.

Can you help?

Artes_Marciales 06-07-2009 12:13 PM

Great Idea


All times are GMT. The time now is 04:52 AM.

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.01763 seconds
  • Memory Usage 1,876KB
  • 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
  • (5)bbcode_code_printable
  • (27)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