• Welcome to Simple Machines Community Forum. Please login or sign up.
September 18, 2021, 04:17:39 AM

News:

Join the Facebook Fan Page.


Post Template Mod

Started by jhaagmans, August 17, 2009, 04:42:27 AM

Previous topic - Next topic

MrCreatoR

Would be very usefull mod.
Is this mod will be updated for SMF 2.0 RC1.2?

jhaagmans

Quote from: MrCreatoR on October 01, 2009, 07:43:19 AM
Would be very usefull mod.
Is this mod will be updated for SMF 2.0 RC1.2?
When SMF2 is stable, we ourselves will be upgrading to SMF2, so it will probably be developed then.

MrCreatoR

Quote from: jhaagmans on October 01, 2009, 07:53:15 AM
Quote from: MrCreatoR on October 01, 2009, 07:43:19 AM
Would be very usefull mod.
Is this mod will be updated for SMF 2.0 RC1.2?
When SMF2 is stable, we ourselves will be upgrading to SMF2, so it will probably be developed then.
Well, SMF2 is prety stable, and i don't think that the final version will include many changes that are post-related.

Can you please tell me at least how i can adapt this mod to 2.0? I just need a direction of what changes do this and that, for example:
'permission_mode' => 'normal',
does not exist in «$sourcedir/ManageBoards.php» anymore, what this change should do?

jhaagmans

Quote from: MrCreatoR on October 01, 2009, 08:59:18 AM
Quote from: jhaagmans on October 01, 2009, 07:53:15 AM
Quote from: MrCreatoR on October 01, 2009, 07:43:19 AM
Would be very usefull mod.
Is this mod will be updated for SMF 2.0 RC1.2?
When SMF2 is stable, we ourselves will be upgrading to SMF2, so it will probably be developed then.
Well, SMF2 is prety stable, and i don't think that the final version will include many changes that are post-related.
I'm sure. But it isn't stable and this is a board I'm modifying for a client, so at this point, I can't upgrade. I'm sorry.

QuoteCan you please tell me at least how i can adapt this mod to 2.0? I just need a direction of what changes do this and that, for example:
'permission_mode' => 'normal',
does not exist in «$sourcedir/ManageBoards.php» anymore, what this change should do?
If you can, look at the source code ManageBoards.php in v1. This particular change is adding a rule to an array I guess (not sure and I'm not able to look right now). Just find the array it's adding to and change the line it should be added after. If the array doesn't exist any more, look for something replacing it or just go and try to do this without this specific line. See what happens.

Good luck! And if you want to submit an update to this mod for 2.0, you're free to do so.

MrCreatoR

jhaagmans [?]
QuoteGood luck!
Thanks :) I managed to fix almoust all issues (except the one i mentioned before), and install test shows that all Success. But after installing i got this error:

QuoteFatal error: Call to undefined function db_query() in Z:\home\smf2.ru\www\Packages\temp\database.php on line 16
I tried to replace «db_query» with «$smcFunc['db_query']» (the variable i added to the top), but i got a syntax error then :( Any ideas?

jhaagmans

Quote from: MrCreatoR on October 02, 2009, 08:19:30 AMI tried to replace «db_query» with «$smcFunc['db_query']» (the variable i added to the top), but i got a syntax error then :( Any ideas?
Something must have changed in the way the database is queried in 2.0. Look at another mod which also does database changes and see what's changed. Is the global $db_prefix; still correct?

MrCreatoR

jhaagmans [?]
QuoteLook at another mod which also does database changes and see what's changed.
Ok, i will check this.

QuoteIs the global $db_prefix; still correct?
I think yes, althought i noticed that instead of $db_prefix in the templates used db_prefix, without the dollar sign.

jhaagmans

Quote from: MrCreatoR on October 02, 2009, 12:13:06 PM
jhaagmans [?]
QuoteLook at another mod which also does database changes and see what's changed.
Ok, i will check this.

QuoteIs the global $db_prefix; still correct?
I think yes, althought i noticed that instead of $db_prefix in the templates used db_prefix, without the dollar sign.
That might be it. I'm not familiar with 2.0, so if anyone is, please step in. I don't know whether anything else has changed, but do these other scripts also use the db_query() function?

MrCreatoR

jhaagmans [?]
QuoteI don't know whether anything else has changed, but do these other scripts also use the db_query() function?
I found a few - they uses this:
$request = $smcFunc['db_query']('', "SHOW COLUMNS FROM ....

And now there is no errors after installing, but i get this when navigating to boards managing section:

Unknown column 'b.post_template' in 'field list'
File: Z:\home\smf2.ru\www\Sources\Subs-Boards.php
Line: 1031


Perhaps i can add data to database manualy?

MrCreatoR

Ok, i think i managed to make this mod work on SMF 2, but the issue with 'permission_mode' is still there, i just disabled it in the new version. I searched in smf version changes (upgrades), but i didn't found any change that related to this line, and i checked every version!

I am attaching now a new version (0.1.3), the new version is added by <install for="2.0 - 2.99.99">, so it's fully compatible with previous versions.

jhaagmans

Great stuff mate. I've added you to the author list, so I hereby invite you to add the file to the mod page yourself :)

MrCreatoR

Quote from: jhaagmans on October 03, 2009, 03:58:43 AM
Great stuff mate. I've added you to the author list, so I hereby invite you to add the file to the mod page yourself :)
Thanks. File has been added...

Changelog
0.1.3 - October 2th, 2009
- Mod now compatible with SMF 2.0 RC1.2.
- Added Russian translation.

jhaagmans

Quote from: MrCreatoR on October 04, 2009, 05:15:01 AM
Quote from: jhaagmans on October 03, 2009, 03:58:43 AM
Great stuff mate. I've added you to the author list, so I hereby invite you to add the file to the mod page yourself :)
Thanks. File has been added...

Changelog
0.1.3 - October 2th, 2009
- Mod now compatible with SMF 2.0 RC1.2.
- Added Russian translation.
Nice. Great stuff mate :)

digit

Very nice.  Installed and is working great. 

I was hoping this would put a bit of text above the text input field... uneditable...  just a bit of text to give board specific instructions.  Any idea how I could modify this mod to do that?   8)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

jhaagmans

Quote from: digit on October 18, 2009, 08:34:28 AM
Very nice.  Installed and is working great. 

I was hoping this would put a bit of text above the text input field... uneditable...  just a bit of text to give board specific instructions.  Any idea how I could modify this mod to do that?   8)
This plugin only modifies the content of the text area. I believe there's another plugin that puts text above your submit button, but I'm not sure which one it is and whether it's still supported.

wladymeer

Looking forward for "every reply" enhancement - very useful mod for those who want form based posts :)

It would be nice if you could somehow include it inside of quick reply as well when you decide to enhance it (or maybe further enhancement - pre-defined form available for "topic starter" only - imagine someone doing reviews while others want to comment it)

lelkins

Hey guys, I tried to install this on RC2 but couldn't get it to work for some reason.
I was trying on the default/curve theme.

Can anyone give me some pointers on how to get it to work?

It installs and I can set the template in the 'modify board' section, but when I go to post a new topic it doesn't give the template.

Thanks!

dry3210

Any updates for 2.0RC2?

Its looking for


<td valign="top" align="left">
<input type="checkbox" name="count" ', $context['board']['count_posts'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';


But the code is now


<dd>
<input type="checkbox" name="count" ', $context['board']['count_posts'] ? ' checked="checked"' : '', ' class="input_check" />
</dd>
</dl>

Nisorin

Anyone have a way to get it to work with SMF 1.1.11?

Eclipse16V

I worked with:
SMF 2 in German

Shop:
SID Giessen

Advertisement: