Hi, how do I set up a form so that it will automatically set an article to be "unpublished" without showing the author this choice? Is there a way to do this with a hidden field and posting a command in the "On Submit code - after sending email" box? Right now my articles are visible to everyone on the frontend even though they show as being unpublished in the Article Manager. I'm using Joomla 1.5.
Thanks!😀
Thanks!😀
Hi mj33122,
Are you using the SubmitContent form?
If so I think you need to include
Bob
Are you using the SubmitContent form?
If so I think you need to include
JRequest::setVar('state', '0');
Bob
Hi Bob, thanks for your quick response. Yes, I am using the SubmitContent form. Where do I put that line of code?
Hi mj3312,
It goes in the OnSubmit before box. In my copy it (or rather the $_POST equivalent) is already there:
Bob
It goes in the OnSubmit before box. In my copy it (or rather the $_POST equivalent) is already there:
<p><span style="color: #0000ff;"><strong>Thank you for submitting your story, we will review it shortly and if approved it will be published!</strong></span></p>
<p><strong>Cheers</strong></p>
<p><span style="text-decoration: underline;"><strong>ChronoEngine.com team!</strong></span></p>
<?php
$_POST['catid'] = '32';
$_POST['id'] = '';
$_POST['sectionid'] = '9';
$_POST['state'] = '0'; // <-- this line
$_POST['created'] = date("Y-m-d H:i:s");
?>
Bob
Hi Bob, I added the line of code and the articles are showing as unpublished in the backend, but are still visible in the frontend. Any ideas? Thanks for your help.
Hi mj33122,
I've no real idea - what shows up in the Admin article manager? Is Front-page on?
Bob
I've no real idea - what shows up in the Admin article manager? Is Front-page on?
Bob
Front page is off. I just noticed however that the created on date is correct, but the start publishing date says "1969-12-31 13:59:59". Would that cause it to be published even though it's set and shown as not published?
Hi mj33122,
Shouldn't do, but it might I guess - that looks as though it's coming from a timestamp of all zeros
Bob
Shouldn't do, but it might I guess - that looks as though it's coming from a timestamp of all zeros
Bob
Hi mj33122,
I dont think that the start publishing date will be important here, regarding the published state, you have it as "unpublished" in the front end then it is, are you logged in as admin in the front end ? may be this is why you can see everything!
Cheers
Max
I dont think that the start publishing date will be important here, regarding the published state, you have it as "unpublished" in the front end then it is, are you logged in as admin in the front end ? may be this is why you can see everything!
Cheers
Max
Hi Max,
I can see the unpublished articles when I am logged in as the admin, but I can also see them when I am not logged in at all. Curiously enough, the only time I CAN'T see them is when I'm logged in as an Author or a Registered user.
I'm using the component Alphacontent to display the articles in a directory. Could that have anything to do with it?
If I can get the Author to show up in the Article Manager as a clickable link like the article entries I submitted via Joomla's forms, I wonder if that would fix the problem. I would like to know how to do so anyway. I did that with the sections/categories already.
I have no idea...I know very little about programming! Help? 🙄
I can see the unpublished articles when I am logged in as the admin, but I can also see them when I am not logged in at all. Curiously enough, the only time I CAN'T see them is when I'm logged in as an Author or a Registered user.
I'm using the component Alphacontent to display the articles in a directory. Could that have anything to do with it?
If I can get the Author to show up in the Article Manager as a clickable link like the article entries I submitted via Joomla's forms, I wonder if that would fix the problem. I would like to know how to do so anyway. I did that with the sections/categories already.
I have no idea...I know very little about programming! Help? 🙄
Hi,
of course this extension may be using different data to publish or unpublish the content, try with the core content component!
Regards
Max
I'm using the component Alphacontent to display the articles in a directory. Could that have anything to do with it?
of course this extension may be using different data to publish or unpublish the content, try with the core content component!
Regards
Max
Thanks for the response. It seems to work the right way w/the core Joomla content, but is there no way to get it to work with Alphacontent? I need to use Alphacontent so I have a directory structure.
Hi mj33122,
Probably; but I know absolutely nothing about AlphaContent - and I suspect that Max doesn't either.
Bob
Probably; but I know absolutely nothing about AlphaContent - and I suspect that Max doesn't either.
Bob
Thanks Bob,
Do either you or Max know whether there are any directory components that are known to work with ChronoForms? Like JoomSuite Resources or MosetsTree?
Thanks.
Do either you or Max know whether there are any directory components that are known to work with ChronoForms? Like JoomSuite Resources or MosetsTree?
Thanks.
Hi mj33122,
Of these three JoomSuite is the only one that is fully Joomla 1.5 compatible so I'd probably look there first. Personally i don't know any of them.
Any of them *should* be compatible with ChronoForms but if they use custom structures like AlphaContent then someone has to dig into the code to find out exactly which setting or database field turns stuff on and off.
Bob
Of these three JoomSuite is the only one that is fully Joomla 1.5 compatible so I'd probably look there first. Personally i don't know any of them.
Any of them *should* be compatible with ChronoForms but if they use custom structures like AlphaContent then someone has to dig into the code to find out exactly which setting or database field turns stuff on and off.
Bob
Oh, I see. How much time would it take someone to look into this if I can't find another solution? (I'd be willing to pay them.)
Hi mj33122,
how those content extensions work ? do they get their data from the normal content table ? if so then you can control the state field!
Max
how those content extensions work ? do they get their data from the normal content table ? if so then you can control the state field!
Max
testing, unpublish a content ietm in the article manager and see if the extension will show it or not!
Max
Max
Ok, it doesn't show the ones submitted with the Joomla form to guests when I set them to unpublished. The ones I submitted with ChronoForms are already set as unpublished in the backend.
you mean that you have some articles unpublished, some of them was created by you and others was created by Chronoforms and those created by Chronoforms are still showing by your extension ?
Yes, the only unpublished items that show are the ones created with the Chronoforms form.
mmm, I don't know then, try to examine the jos_content table at your database and see the difference between these records and those really unpublished! :?
Max
Max
This topic is locked and no more replies can be posted.