It is currently Mon Oct 19, 2020 9:25 pm

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 30, 2014 2:13 pm 

Joined :
Thu Oct 30, 2014 2:01 pm

Posts : 1
Hi,
Thank you for this great component, it is exactly what I was looking for.
Unfortunately I do not get it to work properly.
1. The status of four articles says "error in publishing" - but there is no error.
2. When I want to edit an article the html-editor shows the whole page including menus etc. but not the article that I wanted to modify.
3. Is there a possibility to show users only their own articles? I do not want to edit users others' texts if they have not the required joomla permission. Would that be possible?
Thank you very much in advance.
Best wishes
Dirk


Report this post
Top
 Profile  
 
PostPosted: Mon Dec 01, 2014 12:21 pm 
Apptha Team

Joined :
Tue May 07, 2013 3:09 pm

Responses Posted : 316
Hi,

##) To fix the html layout showing within the editor, kindly follow the below steps.

Steps:

1) Go to file path ../components/com_userarticle/views/article/tmpl/default_articleedit.php

In this file find, echo $editor->display('content', $this->onearticle->introtext, '550', '300', '60', '20', false );

and replace 'content' with 'userarticle_content'

2) Go to ../components/com_userarticle/views/article/tmpl/default_articleadd.php

In this find echo $editor->display('content', $this->onearticle->introtext, '550', '300', '60', '20', false );

and replace 'content' with 'userarticle_content'

3) Go to file path ../components/com_userarticle/models/article.php

In this find the below code

function save_article()
{
$contents = JRequest::getvar('content','', 'post', 'string', JREQUEST_ALLOWRAW);
}

function edit_article()
{
$contents = JRequest::getvar('content','', 'post', 'string', JREQUEST_ALLOWRAW);
}

and replace with the below code

and replace 'content' with 'userarticle_content'


##) For error in publishing, the timezone is vary so that the message is displayed. For this,

1) Go to file path ../components/com_userarticle/models/article.php

In this file find the code $start_b = JRequest::getvar('start',null,'POST'); and before that add the following code date_default_timezone_set('Your time zone');

2) After that, go to ../administrator/components/com_userarticle/views/userarticle/tmpl/default.php

In this find the below code $down=date("Y-m-d H:i:s"); and add the code date_default_timezone_set('Your time zone'); above to the line. Kindly replace the text Your time zone with your time zone based on your country.
Ex: date_default_timezone_set('Asia/Kolkata');

##) By default, user can edit their own articles and not possible to edit other users.


Report this post
Top
 Profile  
 
PostPosted: Mon Dec 01, 2014 1:43 pm 

Joined :
Thu Oct 30, 2014 2:01 pm

Posts : 1
Wow, thanks a lot for the detailled help!
Best wishes
Dirk


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron