Advertisement:

Author Topic: Post Template Mod  (Read 45546 times)

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #20 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?

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #21 on: October 01, 2009, 07:53:15 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.

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #22 on: October 01, 2009, 08:59:18 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:
Code: [Select]
'permission_mode' => 'normal',does not exist in «$sourcedir/ManageBoards.php» anymore, what this change should do?

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #23 on: October 01, 2009, 10:40:00 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.

Quote
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:
Code: [Select]
'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.

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #24 on: October 02, 2009, 08:19:30 AM »
jhaagmans [?]
Quote
Good 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:

Quote
Fatal 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?

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #25 on: October 02, 2009, 10:39:35 AM »
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?
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
Code: [Select]
global $db_prefix; still correct?

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #26 on: October 02, 2009, 12:13:06 PM »
jhaagmans [?]
Quote
Look at another mod which also does database changes and see what's changed.
Ok, i will check this.

Quote
Is the
Code: [Select]
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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #27 on: October 02, 2009, 02:27:39 PM »
jhaagmans [?]
Quote
Look at another mod which also does database changes and see what's changed.
Ok, i will check this.

Quote
Is the
Code: [Select]
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?

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #28 on: October 02, 2009, 04:47:31 PM »
jhaagmans [?]
Quote
I 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:
Code: [Select]
$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:

Code: [Select]
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?

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #29 on: October 02, 2009, 05:33:18 PM »
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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #30 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 :)

Offline MrCreatoR

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Male
  • SMF Version: 2.0 RC1.2
    • AutoIt Russian Community
Re: Post Template Mod
« Reply #31 on: October 04, 2009, 05:15:01 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.

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #32 on: October 04, 2009, 07:30:49 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 :)

Offline digit

  • Sophist Member
  • *****
  • Posts: 1,364
  • Gender: Male
Re: Post Template Mod
« Reply #33 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)
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!)

Offline jhaagmans

  • Semi-Newbie
  • *
  • Posts: 23
Re: Post Template Mod
« Reply #34 on: October 19, 2009, 04:39:21 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.

Offline wladymeer

  • Jr. Member
  • **
  • Posts: 142
  • Gender: Male
Re: Post Template Mod
« Reply #35 on: November 15, 2009, 01:09:32 AM »
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)

Offline lelkins

  • Semi-Newbie
  • *
  • Posts: 11
Re: Post Template Mod
« Reply #36 on: December 17, 2009, 09:53:19 AM »
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!

Offline dry3210

  • Jr. Member
  • **
  • Posts: 165
  • Gender: Male
    • Northeast Sportbikes
Re: Post Template Mod
« Reply #37 on: March 02, 2010, 09:20:52 AM »
Any updates for 2.0RC2?

Its looking for

Code: [Select]
<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

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

Offline Nisorin

  • Newbie
  • *
  • Posts: 8
Re: Post Template Mod
« Reply #38 on: March 12, 2010, 11:17:20 PM »
Anyone have a way to get it to work with SMF 1.1.11?

Offline Eclipse16V

  • Sophist Member
  • *****
  • Posts: 1,070
  • Gender: Male
  • Tornado Map
    • Eclipse16V on Facebook
    • @Eclipse16V on Twitter
    • SID Giessen
Re: Post Template Mod
« Reply #39 on: March 24, 2010, 05:06:05 AM »
Any updates for 2.0RC3
I worked with:
SMF 2 in German

Shop:
SID Giessen