Custom Form Mod

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

Previous topic - Next topic

digit

Sorry to vent, but I am getting REAL frustrated.  I have installed and uninstalled a few times...  the tables are there....  I am getting no link under modifications...

http://www.mysite.com/index.php?action=admin;area=modsettings

And in my error log I am getting....8: Undefined index: CustomForm_tabheader

In my Admin.php, I DO have.... 

   loadLanguage('Admin');
   loadTemplate('Admin', 'admin');
   loadLanguage('Modifications');
   

and in my Modifications.english.php

I DO have....

$txt['CustomForm_tabheader'] = 'Custom Forms';

Thanks in advance...  trying to install on SMF 2.0 RC1


Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Garou

I just installed the 2.x version on a fresh install of the RC and it works fine.

Can you go directly to your forums "?action=admin;area=modsettings;sa=customform"?
That's the settings page for the mod.

Ill attach images to show you what the tabs should look like.

twon

I have a question

I am using SMF 1.1.8 and Joomla 1.5.9
I have SMF linked inside Joomla using a module called Jfusion
I have successfully installed the mod and got it to work but i can only get it to work when i am looking directly at the forums not  when looking at it through Jfusion?
I basically cant pull it up cause there is no link..or the link doesnt pull up the page

any thoughts?
thanks

Garou

I really have no clue when it comes to Mambo/Joomla related stuff. I played with it for a week or so a couple of years ago and wasn't impressed by it so I deleted everything I had. Not to mention that bridging SMF with them has always been a bit buggy.

The only real restriction in the mod is group permissions, so if the rest of the forum is passed through then the mod should pass as well, theoretically anyway.

No offense but you might have better luck with the Joomla boards here on SMF or in the Joomla community. This is beyond my knowledge base and I just don't really have time to experiment with something that's outside of SMF.

digit

Quote from: Garou on March 27, 2009, 01:02:14 PM
I just installed the 2.x version on a fresh install of the RC and it works fine.

Can you go directly to your forums "?action=admin;area=modsettings;sa=customform"?
That's the settings page for the mod.

Ill attach images to show you what the tabs should look like.

Thanks...  Yeah, I do get a page - but with no text - as if the language file isn't being read.

I also can't create new forms.  I hit save but nothing happens.




Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Garou

#485
Your using a custom theme then? You'll have to copy the language files into that theme manually. Check the package parser http://custom.simplemachines.org/mods/index.php?action=parse;mod=1279;attach=89986;smf_version=2.0_RC1 and copy the code for ./Themes/default/languages into your theme.

Note: if you don't have the utf8 language files just ignore those but Help.english.php and Modifications.english.php are required.

digit

Well, I am using a 2.0 theme.....  Airy_Midnight....  Somehow it references the default theme...  I am not used to that either!

It uses an theme_info.xml file that contains....

<?xml version="1.0"?>
<theme-info xmlns="http://www.simplemachines.org/xml/theme-info" xmlns:smf="http://www.simplemachines.org/">
<!-- Theme name, used purely for aesthetics. -->
<name>Airy_Midnight</name>
<!-- Author: your email address or contact information.  The name attribute is optional. -->
<author name="Crip">[email protected]</author>
<!-- Website... where to get updates and more information. -->
<website>http://www.simplemachines.org/</website>
<!-- Template layers to use, defaults to "main". -->
<layers>html,body</layers>
<!-- Templates to load on startup.  Default is "index". -->
<templates>index</templates>
<!-- Base this theme off another?  Default is blank, or no.  It could be "default". -->
<based-on>default</based-on>
<id>crip:airymidnight</id>
</theme-info>


As you can see, I have default listed, and that s where I have my language strings...  but they are not showing up.

Thanks in advance f you can help.
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

digit

Ok, so this IS some sort of a theme issue - if I reset it to the default theme, it works fine.  HMM.  Does someone know if there are issues with themes that use this schema? (an xml file referencing another theme)

Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

helphook

THANK YOU SO SO MUCH FOR THIS MOD!

Everyone who's thinking about using this don't be mislead by some of the posts in here, this program is very easy to use, I had no problems using it all

Given that certain versions other than mine may run into issues it works brillianty on 1.1.18

I've only been using smf for 2 days and i have no type of php expierence

you can code the entire thing in bbc too s you wouldn't even need to know html

2 thumbs up

perro88

Something that could be cool in the mod is a option(when the form is created) that would do something like this:
In that Board, when someone try to make a topic he will be redirected to the contact form instead of the normal post form. this could be great for support boards etc, making it easy for admins and users. regards nice mod.

Garou

digit, Ill have to get a copy of the theme and see if I cant figure something out for you. I got the day off from work tomorrow and Ill take a look at it then. You might also want to try asking Crip since its his theme. Hes a pretty good guy and very helpful.

The code you posted should not effect anything other then the theme settings, and install pages as its just info about the theme. It shouldn't actually do anything about how the theme displays.

perro88, Ive thought of that and had a look at new topic code that SMF uses. I'm not going to say that its impossible as Ive seen other authors accomplish things Ive thought impossible before.

I will say that right now its beyond my grasp of coding. The few attempts I made at this either breaks the forum all together or forces the new topic for every board to go to the form, in which case all posts go to the board that the form is set to. Not good. ;)

The two suggestions I have are to either have a sticky post at the top of the board or if your using 2.0, create a child board that will redirect to the form. There is a mod for 1.1.x that does this as well but I haven't tried it.

perro88

Quote from: Garou on March 30, 2009, 09:31:00 AM
digit, Ill have to get a copy of the theme and see if I cant figure something out for you. I got the day off from work tomorrow and Ill take a look at it then. You might also want to try asking Crip since its his theme. Hes a pretty good guy and very helpful.

The code you posted should not effect anything other then the theme settings, and install pages as its just info about the theme. It shouldn't actually do anything about how the theme displays.

perro88, Ive thought of that and had a look at new topic code that SMF uses. I'm not going to say that its impossible as Ive seen other authors accomplish things Ive thought impossible before.

I will say that right now its beyond my grasp of coding. The few attempts I made at this either breaks the forum all together or forces the new topic for every board to go to the form, in which case all posts go to the board that the form is set to. Not good. ;)

The two suggestions I have are to either have a sticky post at the top of the board or if your using 2.0, create a child board that will redirect to the form. There is a mod for 1.1.x that does this as well but I haven't tried it.
Thnks for the fast feedback and suggestions. I'll give it a try ;)

helphook

1 suggestion I have that I think would be cool for this

is after the person is done filling out the form instead of it only going to the forum where the post is made maybe give an option to make a custom page that it goes to that says something like thanks for filling out your application or w/e

just an idea, program is great

C4G-TK

Is there a way to pull the forum name into the Subject line and bypass making a field that the person fills out?

I was trying to do this and obviously don't have the right code if it is possible.  I tried [UserName] and others.

I was trying to bypass someone being funny and typing in something else other than their name for this one thing.

-img removed-

Garou

digit, Ive installed the airy_midnight20rc theme on my test site and the only thing I had to do to make it work was to drop the CustomForm.template.php in Themes/airy_midnight20rc folder. You can copy that from the Themes/default or from the zip file. If your still having issues let me know.

helphook, that feature has been suggested and is being looked into.

C4G-TK, that feature has been suggested and is being looked into. On the upside if the user is logged in, the form will post as the user anyway. So even if they put something else in there you'll know who they really are. :)

zushiba

So I assume this simply doesn't work for 1.1.8? I've installed it and the admin side everything seems to work fine but index.php?action=forms does nothing.

Ramón Cutanda

Just wanted to say a BIG THANKS

It's been extremely useful for me.

Garou

zushiba, have you created a form in the admin section? If you haven't then there is nothing to show in index.php?action=forms

mang

I didn't see this anywhere, so I apologize if this already exists.  Here's a short snippet of code to change the select box into a series of radio buttons using a custom form

1.  Copy and past the example function as it is described in CustomForm.template.php
2. In your custom function, find:

Code () Select
// Show a selection box?

elseif ($field_data['type'] == 'selectbox')

{

echo '

<select name="', $field_name, '">';

foreach ($field_data['data'] as $option)

echo '

<option value="', $option, '"', ($option == $field_data['value'] ? ' selected="selected"' : ''), '>', $option, '</option>';

echo '

</select>';

}


Replace with
// Show a selection box?

elseif ($field_data['type'] == 'selectbox')

{

foreach ($field_data['data'] as $option)

echo '

<input type="radio" name="', $field_name, '" value="', $option , '">', $option , '<BR>';
}


Now whenever you use a select box it appears as radio buttons.  This will change all select boxes on your form to radio buttons.  See the attached image for before/after. 


Marduke

Awesome mod.

Only question I have is if there is any way to choose the message icon for the threads made using a custom form.  You can choose everything for the thread except the message icon, for some reason.

Would help a ton!

Thanks in advance!

Advertisement: