vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Easy Forms - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=201097)

bananalive 07-03-2009 02:53 PM

Quote:

Originally Posted by tldagent (Post 1842038)
Thanks a bunch for your prompt reply.

Imported and overwrote the current form and it still does the same thing. So I created a new form and the description seems to attach itself on a new form just fine but once I go into edit that form and check the selection boxes and hit save, it goes directly to:
Code:

http://www.philosophyforum.com/forum/#lounge
so I'm thinking it may need some re-write rules for vbseo. For some reason hitting submit opens that anchor link to the lounge.

Does anyone else using this form have vbseo with similar problems?

You could look on vbseo website for hints.

pmflav1 07-03-2009 04:42 PM

I have made a little script for our site and thought I would share how I did it with everyone.

This will give you a directory dropdown list in your form, which we are using to choose pictures within a Directory.

Get rid of the space in the opening IMG tags, had to put a space in them to show up in here.

Create a Custom field in your form.
In the phpcode field add the following:
Code:

$answer = '<select id=" name="'.$formbit[id].'">';
$answer .= '<option>--Select Map--</option>';
$thisanswer = $q_{$formbit[id]};

$dirPath = dir('/path/to/image');
$imgArray = array();
while (($file = $dirPath->read()) !== false)
{
  $imgArray[ ] = trim($file);
}
$dirPath->close();
sort($imgArray);
$c = count($imgArray);
for($i=0; $i<$c; $i++)
{
$answer .= '<option value="'.$imgArray[$i].'">'.$imgArray[$i].'';
}

$answer .= '</select>';

Change the following to suite the dir your images are in:
$dirPath = dir('/path/to/image');

Find in plugin Easy forms Part 1
Code:

/*($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;*/
Replace with:
Code:

($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;
To get the image to show up once the form is submited, enter the following in to the Custom Form Output, change the domain and directory to suit where the image is located:
Code:

[IMG ]http://www.yourdomain.com/images/maps/$q[39][/IMG]
There is probably an easier way of doing this, but hey it works.

Also if you wish to change the size of your images using the IMG tag then visit
http://tech.mikelopez.info/2006/03/0...resize-script/, and download their script.

This is how I used it: Custom Form Output
Code:

[IMG ]http://www.yourdomain.com/images/imgsize.php?w=250&h=250&constrain=1&img=/path/to/images/maps/$q[39][/IMG]
Replace $q[39] with your field number.

Again changing the domain and paths to suit. The paths are absolute, not relative.

pmflav1 07-04-2009 04:45 AM

Another little hand snipped.
This will give you a dropdown list of times, in 15 min incriments. ie. 12:15pm etc....

Create a Custom field:
Enter the following into your PHP Code Filed.

Code:

$start = strtotime('1:00am');
$end = strtotime('11:59pm');
$answer = '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer = $q_{$formbit[id]};

for ($i = $start; $i <= $end; $i += 900)
{
$answer .= '<option value="'.date('g:i a', $i).'">'.date('g:i a', $i).'';
}
$answer .'</select>';

Enjoy.

The next code I will be working on is a java based countdown timer for the frontpage of our site which will let people know how much time is left before the time is reached, compared with the time set in the VB CP.
However if anyone has any ideas on this then please do share, saves re-inventing the wheel.

Cheers

MoveOver.cc 07-04-2009 08:28 AM

"Can't you add it to the main page like any other module?"

No, I can make it a module but it is not visible on the "homepage"

bananalive 07-04-2009 11:18 AM

Quote:

Originally Posted by MoveOver.cc (Post 1842555)
"Can't you add it to the main page like any other module?"

No, I can make it a module but it is not visible on the "homepage"

vBa CMPS -> Edit Modules -> {module}

Select 'Add/Remove From Pages' from dropdown

Then you can choose which pages it is displayed on.

MaR? 07-04-2009 05:34 PM

Hi Banana!!!

I made a MAIL form... all is just right... but the "sender" mail is mine... I want the sender to be the user who´s sending the form... is that possible?... am I clear? lol

bananalive 07-04-2009 07:13 PM

Quote:

Originally Posted by MaR? (Post 1842789)
Hi Banana!!!

I made a MAIL form... all is just right... but the "sender" mail is mine... I want the sender to be the user who?s sending the form... is that possible?... am I clear? lol

Form Plugin: Before Submit
PHP Code:

$from $vbulletin->userinfo[email]; 


MaR? 07-04-2009 07:25 PM

Thank you so much banana!!! workin great.... your mod is EXCELENT!!!!

Quantnet 07-04-2009 09:47 PM

This has a lot of potential. I plan to modify this mod to obtain something TOTALLY DIFFERENT.

example: http://www.trackitt.com/usa-immigrat...kers/i130-i485

Question

1) Can we sort by column headers?
2) Can users go back and complete/update partial filled forms?
3) Is there anywhere the user can control the number of cases they filled?

Thanks

jacko_162 07-04-2009 10:29 PM

i was wondering if i have a question where someone has to put there postcode in, can i have the answer link to a URL to a map showing the postcode?

its for my classified section.

other than that excellent script. clicked install.. :)

also is it possible to highlight answers to 2x questions red and BOLD? (for example both answers should be a price!)

thank you.


All times are GMT. The time now is 09:02 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.02238 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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