vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   New Posting Features - Form Hack (https://vborg.vbsupport.ru/showthread.php?t=126676)

8dayssooner 12-12-2008 10:11 PM

I've just edited my form, and now i get the error message
Quote:

Parse error: syntax error, unexpected T_STRING in /mnt/web2/33/89/51544289/htdocs/forums/newthread.php(71) : eval()'d code on line 888
Line 71 of newthread.php refers to
Quote:

($hook = vBulletinHook::fetch_hook('newthread_start')) ? eval($hook) : false;
and the error message dissapears when i disable form hack... is there anyone who could support me with this on 3.6?

Help would be much appreciated as i'm trying to use this as a Nominations form for a board awards!

Many thanks in advance!

Mike

WNxWakko 12-13-2008 01:58 PM

Quote:

Originally Posted by Digital Jedi (Post 1682683)

Only other thing I can think of is to check to the forum ID variable in the plugin, as well as ENABLE FORM TO BE POSTED setting.

None of that has changed. Ive been using these forms for 2 years and they have always worked. They do work if your logged into an account, the issue is if you are unregistered, the form never creates the thread even though you get the confirmation message. The forum ID is correct because it works right if im logged in.

The only change ive made after the upgrade to 3.7.x is adding the security input code bit. Outside of that, nothing has changed. I suspect something is different for unregistered users from 3.6 to 3.7

xTerMn8R 12-14-2008 12:17 AM

Anyone get tables to work in the answer Template?

I can get my Bold to show in the PM's using the bbcode [B]space{varible}space[B/]

But when I export them or look at the e-mails each line has the BBcode tags and that looks like crap. Am I doing something wrong here. Also does anyone know of a hack to allow you to print PM's

Thanks,
Tom

2dub 12-15-2008 06:47 PM

I just got this to work after many hours of trying to get it to work. I wish it were editable in vB options.

It is a great hack once you figure it out.

Digital Jedi 12-16-2008 02:59 AM

Quote:

Originally Posted by etzero (Post 1683326)
DJ, This is a question in referance to post #1313 where a someone asked:



Which I think I may have found a solution to. If you could please verify or deny this I would appreciate it.

The default code looks like this:

Code:

if ($vbulletin->userinfo['autosubscribe'] != -1)
            {
                $newpost['emailupdate'] = $vbulletin->userinfo['autosubscribe'];
            }
            else
            {
                $newpost['emailupdate'] = 9999;
            }

My thought is that it if changed to this it should always delete the users subscrition regardless if he was set up though the user CP.

Code:

$newpost['emailupdate'] = 9999;

By looking at functions_newpost.php, '9999' apears to be the correct value to delete any subscritions for that thread?

Code:

// ### DO THREAD SUBSCRIPTION ###
    if ($vbulletin->userinfo['userid'] != 0)
    {
        require_once(DIR . '/includes/functions_misc.php');
        $post['emailupdate'] = verify_subscription_choice($post['emailupdate'], $vbulletin->userinfo, 9999);
 
        ($hook = vBulletinHook::fetch_hook('newpost_subscribe')) ? eval($hook) : false;
 
        if (!$threadinfo['issubscribed'] AND $post['emailupdate'] != 9999)
        { // user is not subscribed to this thread so insert it
            /*insert query*/
            $vbulletin->db->query_write("INSERT IGNORE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
                    VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
        }
        else
        { // User is subscribed, see if they changed the settings for this thread
            if ($post['emailupdate'] == 9999)
            {    // Remove this subscription, user chose 'No Subscription'
                $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "subscribethread WHERE threadid = $threadinfo[threadid] AND userid = " . $vbulletin->userinfo['userid']);
            }
            else if ($threadinfo['emailupdate'] != $post['emailupdate'] OR $threadinfo['folderid'] != $post['folderid'])
            {
                // User changed the settings so update the current record
                /*insert query*/
                $vbulletin->db->query_write("REPLACE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)
                    VALUES (" . $vbulletin->userinfo['userid'] . ", $threadinfo[threadid], $post[emailupdate], $post[folderid], 1)");
            }
        }
    }

It seems counter intuitive as I would have guessed a value of ?0? would remove subscriptions.

That's probably just a little beyond my current level of understanding right now. But my gut is telling me that your on the right track. Is this not going to try to remove the subscription before the user is actually subscribed?

j_86 12-16-2008 02:41 PM

I attach a slightly cleaner, indented copy of the standard form template (with the 3.6 security token fix applied (Form Hack 4.1)).

I find it easier to use with clear indentation.

Digital Jedi 12-20-2008 04:32 AM

Looks like I'm running into the Invalid Forum specified message myself now. The URL doesn't append with a thread ID. I see for most people it "fixed itself" when that happened. Any one ever figure out how that actually happened? I just copy and pasted a working Form Hack plugin from my demo board and it's working fine there. Just doesn't seem to work on a new install.

bluesoul 12-29-2008 02:38 AM

Sorry, I couldn't find a good search string, but how does one update the script to work with 3.7.4?

wacodep 01-02-2009 12:49 PM

Searched through the thread, but to no avail.

The Form Hack is working fine, the message is being posted to the hidden forum correctly, yada blah etc.

The problem is with manage attachments. While it DOES show the link on the form to "Attach Files", when you click the button labeled "Manage Attachments", the new window pops up, but then the users get the "No Permissions" message. I can see it fine as admin.

The hack results ARE being posted to a "hidden" forum just fine (sans the attachment, obviously).

Permissions for the usergroups (for the user attempting to add attachments) ARE set to allow attachments and allow posting to the otherwise hidden forum (but no permission to view).

This worked fine with the previous version of the Form Hack under vB 3.5. I'm now using Form Hack 4.1 under vB 3.7.4.

Any suggestions would be appreciated.

Trek 01-06-2009 03:23 AM

I have this all working pretty good, it looks great and almost does what I want.

It posts to a forum as it should, but:

I want this forum to be locked down from posting new posts any way other than through the Form Hack.

I want those who have created threads using Form Hack to be able to edit and reply to their own posts, but no others.

Everyone should be able to view the posts.

Most of this is doable through the permissions, the problem seems to be making it so people can only post through FormHack to the forum (I don't want a bunch of non-standard templated messages posted there).

I've looked through the threads, but with 90 pages, I didn't see everything. Did a few searches, but couldn't find the answer either.

Thanks for any help!


All times are GMT. The time now is 01: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.02720 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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