News:

Join the Facebook Fan Page.

Main Menu

Drafts

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

Previous topic - Next topic

Sudhakar Arjunan

#120
Hi Charles, I have tried to install 2.0.2 beta in my smf 1.1.6

Noted two error test failed fails.

11.   Execute Modification   ./Sources/Recent.php   Test failed
22.   Execute Modification   ./Themes/default/index.template.php   Test failed

Used the parser to manually check the files and found these simple errors,

In Default/Index.template.php file,

Find : <meta name="description" content="', $context['page_title'], '"

Present in my file as :    <meta name="description" content="', $context['page_title'], (!empty($context['description']) ? ' - '. $context['description'] : '') , '" />', empty($context['robot_no_index']) ? '' : '

So that gives me a issue.

In Source/Recent.php file,

Find : WHERE ml.ID_MSG = b.ID_LAST_MSG" .

Present in my file as : WHERE ml.ID_MSG = b.ID_LAST_MSG" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "

Find : WHERE b.ID_CAT IN (" . implode(', ', $_REQUEST['c']) . ")

Present in two lines : Line 237 & Line 1375 So conflict occurs

Give me a solution for the above errors.

I have attached the index.template file and recent file.

Kindly help me to modify it, i will install with errors and then replace the edited file charles.

Help me with the felblog conversion tool also.  :)


I have mistakenly posted in drafts mod instead of Charles Blog Mod.

http://www.simplemachines.org/community/index.php?topic=244848.msg1708368#msg1708368
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Charles Hill

This is the drafts mod thread.... You are asking about the Blog Community mod.

jkrlvgn

#122
First off, Mr. Asudhakar, let me say that you've missed the topic (as pointed out by Mr. Hill).  This isn't the support thread for Blog Community.  The Blog Community support threads are:

http://www.simplemachines.org/community/index.php?topic=244848.new#new
and
http://degreesofzero.com/index.php/board,6.0.html

so please, in the future, refer to the correct support thread to allow the correct answers to your questions.

Granted, I'm not the developer for this Simple Machines modification, but I have to say that I do use it, and had no trouble installing it.  I might add that I've got a fairly heavily modified forum, most of which were manual edits for things other than Blog Community, because they didn't seem to fit in well with eachother.  Most often, if you're looking for support, you want to go ahead and list what you've got, such as a COMPLETE list of installed modifications so that it can be determined where the problem lies.



As for your particular issue, it's actually not that hard of a problem to fix.  If you take a moment and open your eyes to what you're looking at, you'd see that you've already answered part of your first question.

Find : <meta name="description" content="', $context['page_title'], '"

Your file has:

<meta name="description" content="', $context['page_title'], (!empty($context['description']) ? ' - '. $context['description'] : '') , '" />', empty($context['robot_no_index']) ? '' : '

Well...all you're looking for is:

<meta name="description" content="', $context['page_title'],

That is what you want to change.  Right there.  The other stuff, obviously, stays where it is.  I know that it's not the easiest thing to do...you know, reading and comprehending, but that was one that was staring you in the face.  Try to take a few steps before you decide that you need someone to hold your hand for you.


The second error...well...it's obviously going to be the same as the first.

You found the string that needed to be found:

WHERE ml.ID_MSG = b.ID_LAST_MSG" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "

And you're changing the part that says:

WHERE ml.ID_MSG = b.ID_LAST_MSG" .

OMFG!  HOW DID THAT GET IN THERE?  It must have been hiding, you know, between the lines of text that you were looking at, but didn't recognize.

As for the last, if you pull up a copy of recent.php on my system, there's only one instance of that string.

Look for the rest of this:

$request = db_query("
SELECT b.ID_BOARD, b.numPosts
FROM {$db_prefix}boards AS b
WHERE b.ID_CAT IN (" . implode(', ', $_REQUEST['c']) . ")" . (!empty($modSettings['blogMode']) && !empty($modSettings['hideBlogPostsFromForumRecentPosts']) ? "
AND b.blog_board != 1" : '') . "
AND $user_info[query_see_board]", __FILE__, __LINE__);
$total_cat_posts = 0;
$boards = array();
while ($row = mysql_fetch_assoc($request))


In your file, you've got the same thing twice.  Change the first one, and see why you have a second one in there as well.  I doubt that it's there on purpose, as I don't have it on mine.

There you go.  Easy problems, easy fixes.  Requires a little thing called thought.

Kimmie

#123
Just started seeing this error:

8: Undefined index: description
File: /home//public_html/Sources/Post.php
Line: 1743

Line 1743 is part of the draft mod:

Quote// are we modifying a draft? weird huh?
      if (isset($_POST['draftID'])) {
         
         if ($context['is_draft_author']) {
            db_query("
               UPDATE {$db_prefix}drafts
               SET boardID = $topicOptions[board],
                  topicID = '$topicID',
                  isSticky = '$topicOptions[sticky_mode]',
                  locked = '$topicOptions[lock_mode]',
                  smileysEnabled = '$smileysEnabled',
                  categoryID = '$categoryID',
                  icon = '$msgOptions[icon]',
                  body = '$msgOptions[body]',
                  subject = '$msgOptions[subject]',
                  topicDescription = '$msgOptions[description]',
                  timestamp = '". time() ."'
               WHERE draftID = $draftID
                  AND memberID = $ID_MEMBER
               LIMIT 1", __FILE__, __LINE__);
               
            $context['draft_saved'] = true;

Not even sure why that is even in there because Topic Descriptions is not a default feature of 1.1.5 and I do not have the Topic Description mod installed either. Do I need to remove that line?

Charles Hill

Ya you can remove that line... I kinda hastily made changes to this mod :(   I'll add flags to make sure variables are set before it tries to use them.  Also I'll figure out how to fix the issue of posting reply drafts to stickied topics (makes them unstickied apparently).

Sudhakar Arjunan

Hi jkrlvgn,

Thanks for taking your time to explain my fault.

Thanks a lot.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

Hi you have came with 1.0.8 Draft Version. Could  i know the 8 edits you have did so that i could manually upgrade the package with mod parser.

Because when i try to uninstall 1.0.7 Draft, it show two error.

1.   Execute Modification   ./Sources/ManagePermissions.php   Test failed
5.   Execute Modification   ./Themes/default/Post.template.php   Test failed

So i would like to manually update the mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Kimmie

Quote from: asudhakar on September 14, 2008, 11:00:45 PM
Hi you have came with 1.0.8 Draft Version. Could  i know the 8 edits you have did so that i could manually upgrade the package with mod parser.

Because when i try to uninstall 1.0.7 Draft, it show two error.

1.   Execute Modification   ./Sources/ManagePermissions.php   Test failed
5.   Execute Modification   ./Themes/default/Post.template.php   Test failed

So i would like to manually update the mod.

That just means that you have other mods that have affected those files. Uninstall it using the package manager and then manually remove the code from those 2 files and the mod will be entirely uninstalled



Charles
If I uninstall the older version and then reinstall the newer version will it retain the data or will any drafts saved up to that point be deleted during the uninstall?

Charles Hill

The install/uninstall only affects the files not any of the rows in your database tables.

ddarrell

this is truly a nice, and needed Mod.

I installed with no problems and left it up a couple of days.
Yet I discovered one worisome aspect, and that is that the
only way to delete a draft is to post it, then delete the post.

I thought that some users might not figure this out, so
I un-installed it.

It would really be nice if you could alter it so that a user could
bring up his/her saved drafts, and have a way of deleting the
ones that are no longer relevant, without having to post-then-delete same.

Thank you for your excellent work!

ddarrell
i know just enough to really screw up ;D

Charles Hill

You can delete them.  From your Profile > Show Drafts page.  I think you're referring to the table that shows a brief summary of your drafts below the post box on the post page?

ddarrell

Quote from: Charles Hill on September 15, 2008, 09:05:05 PM
You can delete them.  From your Profile > Show Drafts page.  I think you're referring to the table that shows a brief summary of your drafts below the post box on the post page?

My apologies!!  :-[

I reinstalled it, and it is exactly like you say.  Plus: a nice user interface in the profile section for managing the drafts. 

Great Mod, thanks!

:) :) :) :) :)
i know just enough to really screw up ;D

Rafferty

The mod installed without errors and works fine for me as admin. My members are reporting that when trying to save a draft they are getting the error 500. I understand this is a permission function.

I Checked all file and folders on my server and they are set to 755, no reason my members should be getting error 500.

Any thoughts?
Don't Follow me I got No Idea what I'm Doing

Charles Hill

Are you getting any errors in your forum error log?

Rafferty

#134
no errors but ive reinstalled and tested it on 3 members, it worked. thanks
Don't Follow me I got No Idea what I'm Doing

Charles Hill

I don't think the 500 error is being caused by the drafts mod...

Ravac

Serbian translate

index.serbian-utf8.php
// Drafts txt variables
$txt['permissiongroup_drafts'] = 'Skice';
$txt['permissionname_save_drafts'] = 'Možete sačuvati teme kao skice';
$txt['only_new_topics'] = 'Možete sačuvati samo nove teme kao skice.';
$txt['error_draft_not_saved'] = 'Došlo je do nepoznatih grešaka pa s tim
skica<b>nije</b> sačuvana.';
$txt['draft_saved'] = 'Skica je uspešno sačuvana.';
$txt['draft'] = 'Skica';
$txt['showDrafts'] = 'Prikaži skice';
$txt['no_drafts'] = 'Nemate ni jednu skicu sačuvanu.';
$txt['last_saved'] = 'Poslednja sačuvana';
$txt['lastSaved'] = 'Poslednja sačuvana';
$txt['delete_draft_confirm'] = 'Da li ste sigurni da želite da izbrišete izabranu skicu?';
$txt['save_as_draft'] = 'Sačuvaj kao skicu';
$txt['draft_saved_short'] = 'Skica sačuvana';
$txt['loadDrafts'] = 'Učitaj skice';
$txt['hideDrafts'] = 'Sakrij';
$txt['post_draft_confirm'] = 'Da li ste sigurni da želite da postavite ovu skicu kao
temu?';
$txt['drafts_postIt'] = 'Postavi skicu!';

Cal O'Shaw

Mr. Hill,

Have you had the chance to look at solving the "unstickied topic" problem we talked about here?

Grazie,

Cal

Charles Hill


Sabre™

Hi Mate :)
Excellent job with this mod!!

How or would it be possible, to have your draft be able to post in any topic?
Say I made the draft in the SMF 1.x.x support thread, then went over to the SMF 2.x.x thread and wanted to use it there. If I click on "Load Drafts" it would post it in the SMF 1.x.x thread instead of the SMF 2.x.x thread.

Anyway to change this?

Or to have some drafts stay to be repeatedly used over n over again.
Like here when you explain how to use the "Package Parser".
Instead of retyping it over n over again, you could have the "repeat draft/template" to continuosly use when you click "Load Drafts".
Just an idea ;)

Thank You in advance mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: