Guests can add news

Download plugins, language packs and stuff.

Postby ash21 » Thu Oct 12, 2006 11:28 pm

is it possible to have the date & time of submission field to be also displayed as part of the submission form?
ash21
 
Posts: 5
Joined: Thu Oct 12, 2006 6:29 am

Postby FI-DD » Fri Oct 13, 2006 12:21 am

Sorry, I don't understand. Please explain better. :)
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Fri Oct 13, 2006 12:54 am

Maybe he means the date & time section where you can set when the post goes live.. such as postponed or not postponed? Cause as it stands I know the guest hack can only add something that goes live immediately or as soon as it's approved.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby ash21 » Mon Oct 16, 2006 8:25 am

scottdallas wrote:Maybe he means the date & time section where you can set when the post goes live.. such as postponed or not postponed? Cause as it stands I know the guest hack can only add something that goes live immediately or as soon as it's approved.


correct sire



just need the submission page to have the date and time fields as are present when adding news through cp
ash21
 
Posts: 5
Joined: Thu Oct 12, 2006 6:29 am

Postby scottdallas » Mon Oct 16, 2006 6:21 pm

I do not know the answer but that would be nice you're right. I'm sorry hehe. I do have a quick question this. Does the spam filter work on it?



Also, how come avatar isn't in this?
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby scottdallas » Fri Nov 10, 2006 10:58 am

Nevermind I figured it out. This is how you add avatar to this hack. If anyone else wants it, put this at the top of 'guest.php'.



Code: Select all
<script type="text/javascript" src="skins/cute.js"></script>




Put this where you want the avatar spot to be:



Code: Select all
<tr><td>Avatar:</td><td>

<fieldset id="avatar">

<input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value="">

<img name="previewimage" src="skins/images/blank.gif" align="left" style="margin: 5px;">

</fieldset></td></tr>
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby flesh » Wed Jan 24, 2007 11:40 am

When the guest submits the story it submits on the site without the need to be approved ... why ?

and why can't I integrate it with my website ... I use this "} elseif ($do == 'mb302'){

include("/new/guest.php");" ... and it shows the form but when you submit it - the news are not added ... it is possible to add news only when you open the guest.php file itself ... and as I wrote the news are added without being approved by an editor :shock:

The script is really cool :wink: I know that I am doing something wrong :(
flesh
 
Posts: 103
Joined: Sat Mar 04, 2006 3:51 pm
Location: Poland

Postby FI-DD » Wed Jan 24, 2007 7:51 pm

flesh wrote:When the guest submits the story it submits on the site without the need to be approved ... why ?


It's not approved. You can see it on your page because you are logged in as a registered user. Check the "Edit news" section - the news should be unapproved.



and it shows the form but when you submit it - the news are not added ... it is possible to add news only when you open the guest.php file itself ...


Open guest.php and find this:

Code: Select all
<input type="hidden" name="dosend" value="yes">




add below:

Code: Select all
<input type="hidden" name="do" value="mb302">
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby flesh » Wed Jan 24, 2007 9:30 pm

and it shows the form but when you submit it - the news are not added ... it is possible to add news only when you open the guest.php file itself ...


Open guest.php and find this:

Code: Select all
<input type="hidden" name="dosend" value="yes">




add below:

Code: Select all
<input type="hidden" name="do" value="mb302">
[/quote]

not working :(
flesh
 
Posts: 103
Joined: Sat Mar 04, 2006 3:51 pm
Location: Poland

Postby FI-DD » Wed Jan 24, 2007 9:40 pm

I don't know. Then you can't include it using "elseif ($do == 'mb302'){

include("/new/guest.php");" but you have to link to it directly.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby flesh » Wed Jan 24, 2007 9:42 pm

FI-DD wrote:I don't know. Then you can't include it using "elseif ($do == 'mb302'){

include("/new/guest.php");" but you have to link to it directly.


It is included but when I press submit story - it loads the same page :roll:
flesh
 
Posts: 103
Joined: Sat Mar 04, 2006 3:51 pm
Location: Poland

Postby scottdallas » Thu Jan 25, 2007 12:00 am

Is there a way to add the meta keywords and description to this? As my admin panel keeps blanking out lately I might resort to using this to store content to my database in the meantime.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby FI-DD » Thu Jan 25, 2007 12:56 am

flesh wrote:It is included but when I press submit story - it loads the same page :roll:


You said in your first post that it is working when you open guest.php directly. So you have to do it this way because including guest.php is not working for you.



Btw, I just tested it and including guest.php is working for me.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby FI-DD » Thu Jan 25, 2007 12:59 am

scottdallas wrote:Is there a way to add the meta keywords and description to this? As my admin panel keeps blanking out lately I might resort to using this to store content to my database in the meantime.


1. Open guest.php and find this:

Code: Select all
$id = $sql->last_insert_id('news', '', 'id') + 1;




add below:

Code: Select all
$xfields = new XfieldsData();

$xfields->set($_POST['meta_keywords'], $id, 'meta_keywords');

$xfields->set($_POST['meta_description'], $id, 'meta_description');

$xfields->save();




2. Add this to the form:

Code: Select all
<tr><td>Meta keywords</td><td><textarea name="meta_keywords"></textarea></td></tr>

<tr><td>Meta description</td><td><textarea name="meta_description"></textarea></td></tr>
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Thu Jan 25, 2007 3:48 pm

Ah perfect. I did step 2.. but it didn't work. Probably cause I didn't know about step 1 haha. It didn't store cause it didn't know how... but this was before I read your post just now.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

PreviousNext

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests