News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Drafts

Started by live627, June 24, 2008, 01:11:04 PM

Previous topic - Next topic

margarett

More important, you should *REALLY* update your forum, at least up to 2.0.6. You are several security patches behind...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

NoPasaran

everyone can see drafts :S



kralkartal.net SMF 2.0.8

TourFL

Hello!

Thanks for this great mod  :)

I found a small mistake in the code, raising errors in the logs when publishing a draft (but without visible impact):

In Draft.mod, line 623 (version SMF2):
'board' => $boardOptions['board'],
shall be replaced by:
'board' => $topicOptions['board'],

I didn't see it reported anywhere, I hope this helps!
If you like Fiat 500 and derived models, the SMF forum I'm helping with: www.500-126.com

Steve

Also, just a minor note: this in the first post gives me a 404 error:

Quote from: live627 on June 24, 2008, 01:11:04 PMThis mod is also available via my website here

DO NOT pm me for support!

Big Gee

#344
I'm running SMF 2.0.7 at http://gardenerschat-shed.net/forum

I've just downloaded & installed the Drafts 2.0.5 mod so that members can save a draft for future editing before posting.

The mod seems to have installed OK BUT I now have two 'Save as Draft' buttons:



Whichever one is pressed after an editing session the message just gets posted as if the 'Post' button has been pressed.

Can anyone help me resolve this please?

Thanks,

G.[/font][/size]

live627

comic sans is not a good font to use - ever.

live627

you have duplicate code

Big Gee

Quote from: live627 on July 25, 2014, 01:22:37 AM
comic sans is not a good font to use - ever.

Why? And how does that impact on my query?

Big Gee

Quote from: live627 on July 25, 2014, 01:24:21 AM
you have duplicate code

O,K. Thanks. Would that be duplicate code because the 'Drafts' mod has been installed twice? Or is it a case that some of the coding is replicated in another mod?

More importantly can you give me some indicator on how to pinpoint the problem and more importantly how I could resolve the issue please?


Big Gee

Quote from: live627 on July 27, 2014, 01:00:56 AM
http://custom.simplemachines.org/mods/index.php?action=parse;mod=1264;attach=228538;smf_version=2.0.8

Thanks for that live627, but I find your 'minimalist' style answers a little vague. I've read the contents of the link you provided, but do I edit ALL those files to get the Draft mod to work? That's a hefty exercise. A short little explanation would help so that I don't have to continually come back to try and squeeze more information out of you! In the long run it takes longer than providing sufficient information to begin with.

I now find that if I uninstall the Draft mod then I get an error message that the Drafts 'template' cannot be loaded to open the site up at login. So I'm stuck with double 'Save as Draft' buttons that only post comments rather than save them for editing later.

Can you provide a bit more comprehensive support for me please?

thanks.

G.

live627

The link provided should show you which code is added. Some may be duplicated, such as

if (!$context['make_event'] && $drafts_template_loaded !== false)
template_drafts_post_save_as_draft_button();



in  ./Themes/default/Post.template.php

RawsLy

when i'm trying to add new post,

Table 'kmurawsl_forum.smf_drafts' doesn't exist
File: /home/kmurawsl/public_html/forums/Sources/Drafts.php
Line: 226

how can i fix this?

Justyne

Live, a German user contributed a translation for you here http://www.simplemachines.org/community/index.php?topic=526703.0 if you want to include it in your next build.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

live627


MyTime

i'm still fairly new too all of this, but i'm getting a test failed while trying too install in

6.   Execute Modification   ./Themes/default/Post.template.php   Test failed
   1.   Add Before   ./Themes/default/Post.template.php   Test successful
   2.   Replace   ./Themes/default/Post.template.php   Test successful
   3.   Add Before   ./Themes/default/Post.template.php   Test successful
   4.   Add Before   ./Themes/default/Post.template.php   Test successful
   5.   Add After   ./Themes/default/Post.template.php   Test failed

Do I just select the (5. add after) and copy the find code it gives me and than add the code it's telling me after it like it says, sorry if this is  a noob question or if i'm posting this in the wrong place, but it is for this Drafts mod.

Kimmie

Quote from: CannabisGamerClub on September 10, 2014, 10:35:11 AM
i'm still fairly new too all of this, but i'm getting a test failed while trying too install in

6.   Execute Modification   ./Themes/default/Post.template.php   Test failed
   1.   Add Before   ./Themes/default/Post.template.php   Test successful
   2.   Replace   ./Themes/default/Post.template.php   Test successful
   3.   Add Before   ./Themes/default/Post.template.php   Test successful
   4.   Add Before   ./Themes/default/Post.template.php   Test successful
   5.   Add After   ./Themes/default/Post.template.php   Test failed

Do I just select the (5. add after) and copy the find code it gives me and than add the code it's telling me after it like it says, sorry if this is  a noob question or if i'm posting this in the wrong place, but it is for this Drafts mod.


You need to FTP in, edit post.template.php Find the code it is looking for, and add the code it says to after it. Make sure you download a copy of that file before you make any changes. If you make a mistake you can reupload the file before it was changed so you will be back to where you started from.

Ninja ZX-10RR

#357
Referring to this I might suggest a new feature/improvement/whatever-you-want-to-call-it ;)

It will be a bit different since I am supposed to work with the default theme so... Here we go.

Sources/Subs.php
Code (find) Select

'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
),


Code (add after) Select

'drafts' => array(
'title' => $txt['draftsninja'],
'href' => $scripturl . '?action=profile;area=show_drafts',
'show' => allowedTo(array('save_drafts')),
),


And also languages/drafts.english.utf-8.php (or even non-utf, whatever it's the same in both files)
Code (find) Select

?>


Code (add before) Select

$txt['draftsninja'] = 'Drafts';


Refer to the message I linked above to see what it does (well in this case it will only be added below the "Forum profile" sub-menu since it's the default modification, if you install also the other one then the edits should be different).
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

DSystem

I really like this mod  :) So it lacked automatic saving of drafts

Brazil Portuguese translation attached.

Geor'G

#359
Quote from: TourFL on June 19, 2014, 04:32:01 AM
Hello!

Thanks for this great mod  :)

I found a small mistake in the code, raising errors in the logs when publishing a draft (but without visible impact):

In Draft.mod, line 623 (version SMF2):
'board' => $boardOptions['board'],
shall be replaced by:
'board' => $topicOptions['board'],

I didn't see it reported anywhere, I hope this helps!
And not corrected.


To correct. The file Drafts.php:
Code (find) Select
$notifyData = array(
'body' => $row['body'],
'subject' => $row['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $boardOptions['board'],
'topic' => $topicOptions['id']
);


Code (replace) Select
$notifyData = array(
'body' => $row['body'],
'subject' => $row['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $topicOptions['board'],
'topic' => $topicOptions['id']
);

Advertisement: