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)
-   -   Quick Edit! -Edit posts directly from within the thread itself (https://vborg.vbsupport.ru/showthread.php?t=54851)

EvilLS1 01-17-2004 05:12 PM

David,
You can add the subscibe option by placing this next to your sig checkbox in the showthread_quickedit template:

Code:

<input type="checkbox" name="email" value="yes" checked><smallfont>subscribe</smallfont>

EvilLS1 01-17-2004 05:13 PM

Quote:

Originally Posted by The Keeper
You don't suppose it might be behind these problems, do you?

http://www.vbulletin.com/forum/bugs....iew&bugid=1824

I am pretty certain it's the only change I've made to showthread.

I don't think so. But try removing the hack and see if the problem goes away.

David Bott 01-17-2004 05:21 PM

That is great...however that just forces the subscribe. Now if they were not and they edit and do not uncheck the box, they are subscribed. I can move it to NO but that gives the reverse issue.

Any way to pull the correct setting?

Thank you.

EvilLS1 01-17-2004 05:24 PM

Quote:

Originally Posted by David Bott
That is great...however that just forces the subscribe. Now if they were not and they edit and do not uncheck the box, they are subscribed. I can move it to NO but that gives the reverse issue.

Any way to pull the correct setting?

Thank you.

Try using this hidden input:
Code:

<input type="hidden" name="email" value="yes" $emailchecked>

David Bott 01-17-2004 05:42 PM

Thanks...sounded good but only made a blank space with the subscribe by default being on or off. That $emailchecked does not seem to have been set.

I also have QUICKREPLY installed and that does use a $emailbox for either "yes" or just a blank based on the users settings. It does work for that area of the page, but if I try to use the same $emailbox in QuickEdit it is always a blank. Stange that I can not use the same setting.

David Bott 01-18-2004 12:51 AM

Hello....If you can find the answer for the above, that would be great for I have to many members now mentioning it.

In case you did not know...AVS Forum and TiVo Community Forum are very active. AVS even at the time of this post has 1245 users on-line. http://www.avsforum.com

Thanks

EvilLS1 01-18-2004 02:08 AM

David,
I wish I could tell you more, but I honestly don't know. I've never noticed this before because I have notifications turned off on my site. My server is down right now but when its back online I'll try a few things to see if I can make it work. If I figure out something I'll let you know.

Dewayne

David Bott 01-18-2004 06:49 AM

Please be so kind to look into it, for I would hate to remove this very nice hack.

David Bott 01-18-2004 03:41 PM

Ok, taking a lead from "Logician" with his UNSUBSCRIBE LINK IF SUBSCRIBED hack...I present the following code for you to look at. More or less it is part of his hack but changed for quickedit. I am thinking it can be put into the /admin/functions.php file right with your hack insert do we get the data needed when the template is called.

The issue however, is when I tried it, it gave me the error....

Fatal error: Call to a member function on a non-object in /home/avsforum/www.avsforum.com/avs-vb/admin/functions.php on line 275


I am thinking it is with the $threadid in the query not being read in and that is something I do not know how to do. Can you help?

Oh...I would use the "$already_subscribed" below (value to be either 'checked' or ' ') to auto check the Subscribe to Thread check box you had made above.

Code:

//QuickEdit Check If Subscribed To Thread
$quickedit_userid=$bbuserinfo['userid'];

if ($quickedit_userid!=0)
{
$user_subscribed_already=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$threadid' AND userid='$quickedit_userid' LIMIT 1");
$quickedit_subscribed_id=$user_subscribed_already[subscribethreadid];
if ($quickedit_subscribed_id>0)
{
$already_subscribed='checked';
}
else
{
$already_subscribed='';
}
}
else
{
$already_subscribed='';
}
//QuickEdit Check If Subscribed To Thread

Please help. Thanks

EvilLS1 01-18-2004 08:46 PM

David,

In admin/functions.php find:
Code:

if ($post[username] == $bbuserinfo[username]) {
    $edittext = htmlspecialchars($post[pagetext]);

eval("\$quickedit = \"".gettemplate('showthread_quickedit')."\";");
} else {
$edittext="";
$quickedit="";
}

Replace it with:
Code:

if ($post[username] == $bbuserinfo[username]) {
    $edittext = htmlspecialchars($post[pagetext]);
$subuserid=$post[userid];
$pthreadid=$post[threadid];
if ($subuserid!=0) {
$subscribed=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE threadid='$pthreadid' AND userid='$subuserid' LIMIT 1");
$poop=$subscribed[subscribethreadid];
if ($poop > 0){
$emailchecked="CHECKED";
}else{
$emailchecked="";
}
}

eval("\$quickedit = \"".gettemplate('showthread_quickedit')."\";");
} else {
$edittext="";
$quickedit="";
}

The put this line of code in your showthread_quickedit template:
Code:

<input type="hidden" name="email" value="yes" $emailchecked>


All times are GMT. The time now is 11:19 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.01094 seconds
  • Memory Usage 1,745KB
  • 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
  • (6)bbcode_code_printable
  • (2)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
  • (10)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