TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 03, 2024, 02:36:26 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 106
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 95
  • Total: 95

[Block] Custom Post Prefills (and associated hack)

Started by Thurnok, October 07, 2006, 10:44:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

Is there a demo of this available?

Thurnok

There's a "user's perspective" demo on my TP Blocks site that only the TP Team can see.

Thurnok

Thanks to Xarcell for pointing out a small bug - if you don't put a subject in and click the Post button, SMF brings you back to the msg edit screen with the error telling you to put in a subject, and consequently, the Post Prefill would add a duplicate prefill at the end of the first one.

This has been fixed.  The new code is in the first post.  It was the SMF hack code (Post.template.php file) that needed the fix, not the block code, so you only need to update the one.

akulion

everytime i use this I think of thurnok! Thanks man this is the best ever feature to have!

Thurnok

Well, it was after all your idea.  So thanks for the inspiration.  :)

akulion

yea yea :P ideas are million under the sun but its the implementation that counts...after all actions speak louder than words! :D

So its all thanks to you! Youre the maaaan!

Thurnok

Fixed a minor bug.

If you were getting an "undefined index is_first_post" error in your log, it was due to $context['is_first_post'] not defined for PMs, only board posts.  This has been fixed.  The block code is unchanged.  You need to update your /Themes/default/Post.template.php file with the new HACK code from the first post.

This means, if you have already applied the HACK previously, locate it and replace the previous hack code with the new one from the first post.

marzi

Thurnok and Gobo,
I have your mod installed and it is working just as described. Thank you very much for sharing this with others.

Is it possible to code the message that has used the 'Custom post prefills' to be displayed in a more controlled manner. For example, if I have a board for only Recipe postings and I am using the 'Custom post prefills' for the data entry, is there a way (perhaps another block or TP article) to pull the data out of the 'smf_posts_prefills' table and control the display? I know the input does respond the BBC tags, not many casual users are aware of that.

I guess I got the idea from seeing the following:  http://recipes.egullet.org/recipes/r342.html and the information contained in the footer.

(The above message is also posted on Thurnok's web site but as he is often very busy I know it can take him weeks sometimes before he has time to reply. I hope no protocol has been violated.)

Thankx_
marzi

Thurnok

No protocol breach as far as I can tell.  :)

Anyway, yes, I posted an answer to you at my site already, so rather than duplicate that, I'll let you fetch it there. hehe

CampCounselor

#19
this is not working for me can someone get in touch with me concerning this. i have applied the changes to post.template.php and no change/