How To: Let ONLY registered users submit data

gameboyz 01 Nov, 2008
Hi I'm setting up a blog directory site and I want to design a form that can let only registered users submit their blog. After submission a page will be automatically created for the user with their submission details. Is that possible with ChronoForms and Joomla 1.5?

Also if anybody knows an extension that will like, "power search"? I'm going to create a checkbox list for categories of their blog. I want the "Search" extension to search the checkbox ONLY. Or, a tag cloud (that shows the checkbox options) will do just fine.
GreyHead 01 Nov, 2008
Hi gameboyz,

It's pretty simple to add some conditional code to make your form available only to registered users. You'll find examples in the forums here. Max also has some code that will post form data to content pages. I suspect that you might need to write some extra code to format and present the data.

Alternatively you could use a completely different approach and use ScribeFire for contributors to add content from their browsers.

No idea about searches and tags I'm afraid.

Bob
Max_admin 01 Nov, 2008
Hi gameboyz,

look at Downloads/CF applications/ here for a form to add articles to your site!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gameboyz 01 Nov, 2008

Hi gameboyz,

It's pretty simple to add some conditional code to make your form available only to registered users. You'll find examples in the forums here. Max also has some code that will post form data to content pages. I suspect that you might need to write some extra code to format and present the data.

Alternatively you could use a completely different approach and use ScribeFire for contributors to add content from their browsers.

No idea about searches and tags I'm afraid.

Bob



Oh dear I'm totally new to programming though I plan to learn. Have no idea how to write some extra code. And okay, I'll try searching in the forums for the conditional code.
gameboyz 01 Nov, 2008

Hi gameboyz,

look at Downloads/CF applications/ here for a form to add articles to your site!

Cheers
Max



Okay thanks!
Max_admin 01 Nov, 2008
Hi gameboyz,

see my example, and searching the forums for "making the form for online users" will sure bring many results where you can find this issue already solved many times!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gameboyz 01 Nov, 2008
I designed my form and set Enable Data Storage to yes and data stored in jos_content .

This is my form url.
<div  class="form_item"><div class="form_element cf_text"><span class="cf_text">Submit your blog</span></div><div class="clear"> </div></div><div  class="form_item"><div class="form_element cf_textbox"><label class="cf_label">Name</label><input class="cf_inputbox required" maxlength="150" size="30" id="text_1" name="text_1" type="text"><a onclick="return false;" class="tooltiplink"><img  src="components/com_chronocontact/css/images/tooltip.png" class="tooltipimg" border="0" width="16" height="16"></a><div  class="tooltipdiv">Name :: Your name</div></div><div class="clear"> </div></div><div  class="form_item"><div class="form_element cf_textbox"><label class="cf_label">URL</label><input class="cf_inputbox required validate-url" maxlength="150" size="30" id="text_4" name="text_4" type="text"><a onclick="return false;" class="tooltiplink"><img  src="components/com_chronocontact/css/images/tooltip.png" class="tooltipimg" border="0" width="16" height="16"></a><div  class="tooltipdiv">URL :: Your blog url</div></div><div class="clear"> </div></div><div  class="form_item"><div class="form_element cf_radiobutton"><label class="cf_label">Adult content</label><div class="float_left"><input value="Yes" class="radio validate-one-required" id="Yes0" name="radio0" type="radio"><label for="Yes0" class="radio_label">Yes</label><br><input value="No" class="radio" id="No0" name="radio0" type="radio"><label for="No0" class="radio_label">No</label><br></div><a onclick="return false;" class="tooltiplink"><img  src="components/com_chronocontact/css/images/tooltip.png" class="tooltipimg" border="0" width="16" height="16"></a><div  class="tooltipdiv">Adult content :: Does your blog contains pornographic content?</div></div><div class="clear"> </div></div><div  class="form_item"><div class="form_element cf_button"><input value="Submit" name="undefined" type="submit"></div><div class="clear"> </div></div>


However upon submission, I get an error message: Warning: implode() [function.implode]: Invalid arguments passed in /home/gameboyz/public_html/sgbloggers/libraries/joomla/database/database/mysql.php on line 538
Max_admin 02 Nov, 2008
more than the connection is needed, load my form for submit content and look at the code fields for values needed!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gameboyz 02 Nov, 2008

more than the connection is needed, load my form for submit content and look at the code fields for values needed!



Okay I'm guessing it's the form code>form html right? Is it the
<div  class="form_item"><div class="form_element cf_textbox"><label class="cf_label">
?

Oh by the way, I love your support response. I posted many topics at joomla forums and I got nothing. Zero. But here, everyday I can look forward to more response from you guys. Great work! 😀
Max_admin 02 Nov, 2008
Hi gameboyz,

and the "onsubmit code" box at the "form code" tab too, you will have to look at the code there, your fields names should match the table fields names too, I suggest you analyze the submitcontent form code very well first then move with yours!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gameboyz 03 Nov, 2008
I see what you mean.
<?php
$_POST['catid'] = '32';
$_POST['id'] = '';
$_POST['sectionid'] = '9';
$_POST['state'] = '0';
$_POST['created'] = date("Y-m-d H:i:s");
?>
But a few questions.. What does $_POST , ['catid'], and the numbers mean? i'm seriously lost.
GreyHead 03 Nov, 2008
Hi gameboyz,

$_POST is an array that contains all of the form results. The individual results are accessible from the array elements e.g. $_POST['field_name']. I haven't been following this thread but this looks like article metadata - 32 & 9 identify the category and section, state = 0 means unpublished.

Bob
Max_admin 03 Nov, 2008
Exactly as Bob said, we set here the essential article data which has not been set in the form itself, your form fields names also should be the same as the articles(content) table fields names!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gameboyz 03 Nov, 2008
Guys thank YOU so much. Finally after several days of posting, I figured it out! Great support! Now all I have to do is find the code that allows only registered users to submit. I'll try searching in the forums.

:D

Thumbs up!
gameboyz 04 Nov, 2008
I can't find the conditional code to make it available only for registered users😟

Other then that it's all perfect. SH404SEF URLs configured (Don't know how I managed it, previously the URLs begin with "component/" and not index.php; but suddenly it just worked) and everything done.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger