News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

thechronic2001

Hello
I've ran into some problems, yesterday I installed this mod, everything was working fine in regards to the mod working correctly.

Later on I decided to update the smiley set and added a new pack, for some reason now when i go to Admin CP/Features and Options then to custom forms section I get this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
File: C:\Inetpub\vhosts\{domain}\httpdocs\{forum_path}\Sources\ModSettings.php
Line: 628


Line 628 of ModSettings.php is as follows

WHERE ID_BOARD IN (0, $board)", __FILE__, __LINE__);


Here is the start of that section down to the first "else"

// Array for all icons that need to revert to the default theme!
$context['javascript_icons'] = array();

if (($temp = cache_get_data('posting_icons-' . $board, 480)) == null)
{
$request = db_query("
SELECT title, filename
FROM {$db_prefix}message_icons
WHERE ID_BOARD IN (0, $board)", __FILE__, __LINE__);
$icon_data = array();
while ($row = mysql_fetch_assoc($request))
$icon_data[] = $row;
mysql_free_result($request);

cache_put_data('posting_icons-' . $board, $icon_data, 480);
}
else


Does anyone have any ideas on how to fix this error?

i installed the mod on my test forum and it worked fine, fully functional, when i installed it on my real forum it installed and worked for a while then all of a sudden it stopped  I've removed and reinstalled the mod but it makes no difference.


My forum Version is as follows:
SMF File                                 Your Version   Current Version
SMF Package                          SMF 1.1.16   SMF 1.1.16
Sources                                         1.1.16   1.1.16
Default Templates                         1.1.12   1.1.12
Language Files                               1.1.15   1.1.15
Current Templates                           1.1.5   1.1

Database server type          MySQL
Database server version          5.0.45


Any help would be greatly appreciated  ;)

thechronic2001

I finally got this problem sorted after 2 days looking at random files, basically the above error occurs when you have "Enable customized message icons" in
Admin / Forum / Smileys and Message Icons  / Settings
If the "Enable customized message icons" Checkbox is Checked it Throws this sql error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
File: C:\inetpub\vhosts\{domain}\httpdocs\{forum_directory}\Sources\ModSettings.php


Just a FYI in case anyone else gets caught out with this problem and spends a few days pulling out the last few stands of hair they have left

Taglar Dreskk

Quote from: umiya on August 04, 2012, 03:05:47 PM
Is it possible to have multiple answers with maybe a check box, radio box? I have only been able to get it setup where you can only chose one answer.

I'd be interested in this feature as well...

maddoghalo

When somebody posts the forums, how do I get the thread title to include their forum username?

I use to be able to do it but forgot how. When they click submit it makes a new thread and is says for example: Maddoghalo's Application.

FrizzleFried

Quote from: PsYc0TiC on July 29, 2012, 05:56:20 PM
I understand that... why the attitude?
Might have something to do with your sense of entitlement?  Hmmm.... could be.


stylusss

Quote from: DBAllTerrain on June 25, 2012, 03:20:08 PM
Solved my own problem. For others...

In the CustomForm.php file, after the following line:

createPost($msgOptions, $topicOptions, $posterOptions);

I added this:

if (isset($topicOptions['id'])) {
$topic = $topicOptions['id'];
$smcFunc['db_insert']('ignore',
'{db_prefix}log_notify',
array('id_member' => 'int', 'id_topic' => 'int', 'id_board' => 'int'),
array($user_info['id'], $topic, 0),
array('id_member', 'id_topic', 'id_board')
);
}


Seems to work.

Is this for 1.x or 2.x?
For top-notch server quality and expertise, visit CoreISP.net

frytec

#1486
Please, i need to send an email to admin@mysite each time a form is submitteed and a post is created.

- The reciepient email is always the same.
- The email subject is always the post title.
- The email body is always the post body.

Can someone tell me the easiest way to do that?

Thank you.


miguel

how mani I put Icons for imput images and other thing whith the normal post in the Large (Multiline) Text Box?

Xehara

I've made two forms and they work perfectly, however the third doesn't seem to be as charming...

All puns aside, though, I'm using the following plugins on the forums:

  • Gamer IDs 1.4
  • 6 Customs buttons / tabs with Sub Menus (4) 0.5
  • Mobile Device Detect
  • ResizeImagesToFitScreen ** (The form involves submitting images that are automatically put into image tags)
  • Additional Instant Messengers 1.0.1
  • SMF Gallery Lite 3.1.3
  • Custom Form Mod 1.7
  • Karma Buttons 1.1
  • SMF Staff Page 1.7
  • Spoiler BBCode 1.1.3
  • Social Buttons 2.0
  • AC in Black Smiles
  • YouTube BBCode 2.6
  • Send Locked Topics to Bottom 1.0
  • EzPortal 0.6.6a

Below are screenshots of how I have it set up. I've tried with regular members checked and unchecked, neither work.





It shows up in the list of forms, however when I fill it out it does not submit to the form specified in the settings.

.Vapor

Quote from: phebos on February 21, 2012, 08:43:22 PM
Quote from: Saiyan1337 on October 21, 2011, 07:10:20 PM
Im not sure why Im getting this error. The site was installed last night and is running 2.0.1. The theme is 2.0.1 as well.



having same error is there any fix, running smf 2.0.2

Open: Sources/Admin.php

Find:
// Load the language and templates....
loadLanguage('Admin');
loadTemplate('Admin', 'admin');


Add after:    
loadLanguage('Modifications');

PtCLAN

Does anyone use this for a clan application? If so could you please show me some screen shots or a copy so I can maybe use it? I have no idea how to make it work on our website. All I really want to do is create an application for new members.

jafonseca

It will be good that it have a preview button

xTyler

I also have created two form's that work perfectly and the third doesn't post at all.

Any idea's why the mod only allows 2 forms?


Thanks.

jstop

How do you redirect the form on submit. The topic submits to a page not accessible to everyone so they get an error, how do I redirect the page so they don't get an error but it still post to the correct topic.
Website admin for
-------------------------------------------------
http://bridgestonemotorcycleparts.com
http://www.6x6talk.com

Jeremy M.

I installed this, but had no idea it was gonna be this difficult.

I'm wanting to create a Staff Application for my forum, but have no idea how. Can someone cook me up one?

ThePr0fess0r

OK, I have created a custom form. Easy enough, but I cannot figure out for the life of me how to direct someone to that form to fill out! Any help would be appreciated.

Zagdul

Quote from: ThePr0fess0r on December 17, 2012, 01:10:26 PM
OK, I have created a custom form. Easy enough, but I cannot figure out for the life of me how to direct someone to that form to fill out! Any help would be appreciated.

You have to give them a link or add in your Subs.php an additional link to the top of your site (or wherever you want it really).

I've made custom forms where I had a big shiny button I would add into a simple portal block as a simple <a> tag.

FireDitto

Quote from: frytec on September 11, 2012, 12:31:20 PM
Please, i need to send an email to admin@mysite each time a form is submitteed and a post is created.

- The reciepient email is always the same.
- The email subject is always the post title.
- The email body is always the post body.

Can someone tell me the easiest way to do that?

Thank you.

Set your account to watch the board on which the topic posts. That way you will get an email any time a new form is posted or a reply is posted to that topic. That would be the quickest and easiest way I think.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Hoodie

I'm getting the following errors:

8: Undefined index: 8
File: /home/****EDITED****/public_html/cocforumz/Sources/ManageSettings.php
Line: 2707

8: Undefined index: 7
File: /home/****EDITED****/public_html/cocforumz/Sources/ManageSettings.php
Line: 2707

8: Undefined index: 6
File: /home/****EDITED****/public_html/cocforumz/Sources/ManageSettings.php
Line: 2707

8: Undefined index: 5
File: /home/****EDITED****/public_html/cocforumz/Sources/ManageSettings.php
Line: 2707

8: Undefined index: 4
File: /home/****EDITED****/public_html/cocforumz/Sources/ManageSettings.php
Line: 2707



Here are the few lines around and including line 2707 of ManageSettings.php:



2704 $permissions_string = $txt['admin'];
2705 if(isset($permissions['custom_forms_'.$row['id_form']]))
2706 foreach($permissions['custom_forms_'.$row['id_form']] as $membergroup_id)
2707 $permissions_string .= ', '.$membergroups[$membergroup_id];
2708
2709 // Try to find the name of the board.
2710 $board_name = 'Invalid Board';
2711
2712 $board_request = $smcFunc['db_query']('','



I've attached the Custom Forms Mod Settings page showing the reason these errors are popping up.  When the Regular Members group is selected, it should show the post count groups (Newbie, Jr Member, Full Member, Sr Member, Hero Member) but they aren't showing up.  If you uncheck regular members in settings for this form, the errors go away.

DBAllTerrain

Quote from: stylusss on September 07, 2012, 12:09:03 AM
Quote from: DBAllTerrain on June 25, 2012, 03:20:08 PM
Solved my own problem. For others...

In the CustomForm.php file, after the following line:

createPost($msgOptions, $topicOptions, $posterOptions);

I added this:

if (isset($topicOptions['id'])) {
$topic = $topicOptions['id'];
$smcFunc['db_insert']('ignore',
'{db_prefix}log_notify',
array('id_member' => 'int', 'id_topic' => 'int', 'id_board' => 'int'),
array($user_info['id'], $topic, 0),
array('id_member', 'id_topic', 'id_board')
);
}


Seems to work.

Is this for 1.x or 2.x?
This is for 2.x, specifically 2.0.2 or 2.0.3.

Advertisement: