vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Canned Text (https://vborg.vbsupport.ru/showthread.php?t=50513)

Xscape 03-21-2003 01:44 AM

Hmm... I like the idea... And I installed...

But I don't get why I see nothing in under
"Edit Canned Text"

filburt1 03-21-2003 01:47 AM

If the textboxes are empty it's because you haven't defined any custom text yet.

Xscape 03-21-2003 01:49 AM

No, there's just nothing there. The table ends after "Edit Canned Text".

filburt1 03-21-2003 01:50 AM

Then you didn't install the hack correctly, or you're not using my normal requirements of PHP 4.3.0 and vB 2.3.0 RC3.

Boofo 03-21-2003 04:44 AM

To have the usercp navbar appear at the top of the page in your cannedtext page:

NOTE: You may want to edit the first part here. I have 9 items in my navbar. You may have less or more.

Add this:

PHP Code:

  $cpnav[1]="#1C5780";
  
$cpnav[2]="#1C5780";
  
$cpnav[3]="#1C5780";
  
$cpnav[4]="#1C5780";
  
$cpnav[5]="#1C5780";
  
$cpnav[6]="#1C5780";
  
$cpnav[7]="#1C5780";
  
$cpnav[8]="#1C5780";
    
$cpmenu[9]="class=\"fjsel\" selected";
  
$cpnav[9]="#13486D"

Above this:

PHP Code:

  eval("\$cpnav = \"".gettemplate("usercpnav")."\";"); 

And put:

Quote:

<br>
$cpnav
<br>
In the cannedtext template right BELOW this:

Quote:

<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
<tr>
<td width="100%"><normalfont>
<b><img src="https://vborg.vbsupport.ru/images/vb_bullet.gif" align="middle" alt="$bbtitle - powered by vBulletin version $templateversion">
<a href="index.php?s=$session[sessionhash]">$bbtitle</a>
&gt; Edit Canned Text</normalfont></td>
</tr>
</table>
You will have to ajust the colors accordingly since vb.org parses them out here. But you should all get the idea. ;)

pattox 03-21-2003 12:09 PM

I dont seem to have permission to access cannedtext.php, I am admin...

filburt1 03-21-2003 12:13 PM

With my original cannedtext.php? It will load if your userid is not 0 (i.e., you're not a guest). Make sure you're logged in.

pattox 03-21-2003 12:19 PM

You do not have permission to access this page. This could be due to one of several reasons:
You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules.
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logged in user: Owen [logout]

filburt1 03-21-2003 12:34 PM

What are the first few lines of cannedtext.php?

pattox 03-21-2003 12:42 PM

Code:

<?
if ($_POST['action'] == "save")
{
        $templateused = "standardredirect,redirect_cannedtextsaved";
        require("./global.php");
        if ($bbuserinfo['userid'] == 0 or $ctmax == 0) show_nopermission();
       
        $userid = $bbuserinfo['userid'];
       
        // force the update to work if the rows don't exist yet
        $DB_site->query("DELETE FROM cannedtext WHERE userid = $userid");
        $DB_site->query("INSERT INTO cannedtext (userid, number, contents)
                VALUES ($userid, 1, \"\"), ($userid, 2, \"\"), ($userid, 3, \"\"), ($userid, 4, \"\"), ($userid, 5, \"\")");


lalo landa 03-21-2003 12:48 PM

the same happends to me....
do U know what's goin on?

filburt1 03-21-2003 12:51 PM

Make sure that you have the canned text settings correct in the admin CP

lalo landa 03-21-2003 12:53 PM

there's options only in the MAIN options of the vb?
because the only settig that i see is the max of words...

lalo landa 03-21-2003 12:56 PM

the problem is in here
PHP Code:

if ($bbuserinfo['userid'] == or $ctmax == 0show_nopermission(); 

I take out the line and works grate.. but.. the unregistred can access

lalo landa 03-21-2003 01:02 PM

Ready

change the line
PHP Code:

if ($bbuserinfo['userid'] == or $ctmax == 0show_nopermission(); 

for
PHP Code:

if ($bbuserinfo['userid'] == show_nopermission(); 

and works fine but U can't disable the "service"

Boofo 03-21-2003 01:27 PM

I think you need to go to the Admin CP and open the cannedtext options and save it for it to work right. I am using the same code (with a few usergroupids added) that you took out and it works fine for me. ;)

pattox 03-21-2003 01:57 PM

yea, that woz the problem. I didnt realise that installer added the settings...

filburt1 03-21-2003 02:01 PM

What's more the installer makes the settings defaults of not 0 so it's weird that it happened. Either way that line works: if the user is a guest or the system is disabled, then deny access.

Boofo 03-21-2003 02:08 PM

filburt, you might want to add that to the instruction file where they have to go to the options and hit enter to make it work. ;)

filburt1 03-21-2003 02:10 PM

I have to edit my install script to edit the options template too (stupid vB way of doing settings...).

edit: I can't until I get home anyway because it's tricky to compress stuff in OS X.

Boofo 03-21-2003 02:17 PM

Whenever is fine. It will save you a lot of "it's not working, what's wrong" messages. I know how much time you need for math. Just trying to help. ;)

Boofo 03-25-2003 11:50 AM

filburt, I put this hack in the newthread.php too, but I want to make sure I have to code in the right spot so as not too mess with anything else in there. I put the code for this hack below the following code:

PHP Code:

  // check to see if signature required
  
if ($bbuserinfo[userid]!=and !$previewpost) {
    if (
$bbuserinfo[signature]!="") {
      
$signaturechecked="CHECKED";
    } else {
            
$signaturechecked='';
        }
    if (
$bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    } else {
            
$emailchecked='';
        }
  } 

Is that ok or do I need to move it somewhere else?

filburt1 03-25-2003 01:07 PM

It should be pretty much anywhere after the permission checks and before showthread is eval'ed.

Boofo 03-25-2003 01:22 PM

Well, it's in the Start New Thread section and the only permissions in there are for the poll posting. That is the last section of the file and a few lines up from the dooutput newthread. Hopefully it will be ok there.

drumsy 03-25-2003 03:28 PM

Why does the "Canned Text" Nav option display correctly when accessing my User CP but when I click on anything else like Edit Options or Private Messages, it get's blacked out?

drumsy 03-26-2003 01:13 PM

Bump! :)

filburt1 03-26-2003 02:12 PM

I think it's a bug, look at that whole block of the same code with indicies 1 to 7 and add the 8th where appropriate.

Boofo 03-26-2003 06:02 PM

filburt, is there a way to allow canned text to be added to the message instead of writing over anything we have in the message box when we use it? Right now, if I write anything in the message and click any canned text, it erases what is there and inserts the canned text.

filburt1 03-26-2003 07:00 PM

Edit the Javascript added via the template mod (no, don't know how).

Boofo 03-26-2003 07:09 PM

You and me both. ;) I'm disappointed now, filburt. I thought you were the "Ultimate Hacker" these days, capable of almost anything, with all of the great hacks you've been releasing. ;)

Does anyone else reading this thread know how to accomplish this?

filburt1 03-26-2003 07:11 PM

Quote:

Today at 04:09 PM Boofo said this in Post #70
You and me both. ;) I'm disappointed now, filburt. I thought you were the "Ultimate Hacker" these days, capable of almost anything, with all of the great hacks you've been releasing. ;)

I'm working on yet another addition to the Major Additions category :p

Boofo 03-26-2003 07:13 PM

Well, I guess we'll just have to see if you keep the "Ultimate Ultimate Hacker" status after you release it then, huh? ;)

You're going to have to do something pretty amazing to recover from this, though, I'm afraid. :p

drumsy 03-27-2003 01:41 PM

Quote:

Yesterday at 11:12 AM filburt1 said this in Post #67
I think it's a bug, look at that whole block of the same code with indicies 1 to 7 and add the 8th where appropriate.
I'm not quite following you....:(

drumsy 04-01-2003 12:06 AM

Bump! :)

sabret00the 04-01-2003 03:12 PM

Great hack, will be installing this on my boards soon

Boofo 04-02-2003 11:14 AM

filburt, how do we make it so the canned text boxes have 2 on each line instead of one box on each line and wasting all that space?

filburt1 04-02-2003 12:00 PM

Just edit the cannedtext template but you'll loose the ability to dynamically show the correct number of textareas.

Boofo 04-02-2003 02:34 PM

If I knew how to do it, I wouldn't have bothered you with it. ;)

I'm still new at tables, but isn't there a way to make it do 2 tables side by side for each line and do it something like that?

filburt1 04-02-2003 02:36 PM

Would be more efficient to make it 4 columns instead of the 2 it is now.

Boofo 04-02-2003 02:42 PM

Ok, how can we do that?


All times are GMT. The time now is 07:33 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.01452 seconds
  • Memory Usage 1,826KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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