read more link -submit content form

freefall 12 Mar, 2010
I am using ChronoForms submitcontent with file upload field.

Code used from this post http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=13056#p26629

After reading this post
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=13681&p=28538&hilit=read+more+link#p28538

with
JRequest::setVar("fulltext", $fulltext_template);

This is user submitted content <hr id="system-readmore" /> <br /><br /><img src="...jpg" >

with
JRequest::setVar("introtext", $fulltext_template);

Now content is gone along with read more link and it shows image only: <br /><br /><img src="...jpg" >

Could you help me to figure out how to get rid of read more link and show the content?
Thank you in advance for your help.🙂
GreyHead 12 Mar, 2010
Hi freefall,

I'm confused, please explain exactly what you are trying to do?

Bob
freefall 12 Mar, 2010
hello! I apologize for not making this clear.

Problem: When user submit content with file attached, it works fine except that it adds <hr id="system-readmore" /> automatically (i guess it happens when i use joomla variable fulltext ) right after the content and before attached file.

so in the article manager, i have 'contents' '<hr id="system-readmore" />' '<img src=..>'

What i want to do: 'contents' '<img src=..>'

Reason: when image is after <hr id="system-readmore" />, image won't show in the front page.
Thank you again for your time.
GreyHead 13 Mar, 2010
Hi freefall,

If you are using the code from the other post then I don't see how the 'There's more' link would end up in the middle of your content. My understanding is that the link is automatically placed by Joomla after the introtext.

Bob
freefall 13 Mar, 2010
Hello Bob,
I kind of figure it out.(took me 5 hours... :mrgreen: )

If you are using text area field name "introtext" in Form HTML, and then use JRequest::setVar("fulltext", $fulltext_template) in On Submit code - after sending email, you will have introtext, <hr id="system-readmore" />, fulltext in article manager.

In case somebody needs this, here is the code for On Submit code - after sending email.
My text area field name is 'user_content', and i have file upload form field name 'file_1'


<?php  
$user_content =  JRequest::getVar('user_content', '');
$file_1 = JRequest::getVar('file_1', '');

if ( $file_1 ) {
  $fulltext_template =$user_content.'<p class="imageupload"><img src="images/stories/'.JRequest::getVar("file_1").'"></p>';
} else {
  $fulltext_template = $user_content;
}

JRequest::setVar("introtext", $fulltext_template);

$_POST['catid'] = 'enter category id here';
$_POST['id'] = '';
$_POST['sectionid'] = 'enter section id here';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");
 ?>
GreyHead 15 Mar, 2010
Hi freefall,

That looks neat - well done.

Bob
This topic is locked and no more replies can be posted.