TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 362
  • Total: 363
  • tino

Generic Application Form

Started by JPDeni, May 23, 2009, 11:04:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JPDeni

I just got up :) . I'll try testing it out in a bit.

ed_m2

hmmmm.. nicely bumped thread.

wonder if i could use this as the basis for my custom events fields entry.... :)

EasyRider

Quote from: JPDeni on September 23, 2009, 03:31:01 PM
I just got up :) . I'll try testing it out in a bit.



Ok JPDeni.. :) :)  i wait.. :)


Also this is my test  forum , take a look if you have time  :) and tell my..

http://adultforumgr.freehostia.com
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

Okay. I think I've got it.

At the beginning of the code, just after


global $sourcedir, $ID_MEMBER, $context, $scripturl, $user_info;


add


if (isset($_GET['topic'])) {


and at the very end of the code, add


}


(This will prevent the form from showing unless the person is viewing a topic.)

Find


echo '
<form action="' . $scripturl . '?page='  . $_GET['page'] . '" method="post">


Replace it with


$place = $_SERVER['REQUEST_URI'];
echo '
<form action="' . $place . '" method="post">


I've just tested it out and it works fine. :) However (there's always a "however", isn't there?), the user will have to go back to the index and then back to the topic in order to see their post.

I've set up an account for you on my test site so you can see how it works. I'll send you login details by PM so you can test it out.

ZarPrime

JP, could you PM those login details as well.  I'd like to see what you guys are doing.

ZP

EasyRider

Ok  JPDeni..!  i already  post there.. check it out..  :) :)
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

JPDeni

ZP, you've got an account already.

http://tester.jpdeni.com/index.php

There's just one board. You can access the form from any topic in the board. You have to go back to the index and then back to the topic in order to see your new post.

EasyRider, I saw your post. You select which topic from the board index. If you only had 30 -- or even 50 -- different topics, I would be able to use a select field with the topics. But with 700 possible topics, that's too many to put into a select list. This is the best way to do it.

EasyRider

Ok..!  :)  i thing this is the best way to work in all topics..

I go to check it out now and i tell you what happen ..  :up:
SMF  1.1.11 / TinyPortal v1.0 beta 4 /default theme

ZarPrime

Quote from: JPDeni on September 23, 2009, 05:09:38 PM
There's just one board. You can access the form from any topic in the board. You have to go back to the index and then back to the topic in order to see your new post.

OK, I see what you are doing.  I tried hitting refresh instead of going back to the board index and it just posted the same form again.  OK, I can see what you did with this now.

Thanks,
ZP

JPDeni

QuoteI tried hitting refresh instead of going back to the board index and it just posted the same form again.

That's a potential problem and I'm not sure how to get around it. Probably the only thing you can do is to put something in the "thank you" part that displays after the form is submitted. And if there are duplicates, the admin will just have to delete them.

This website is proudly hosted on Crocweb Cloud Website Hosting.