vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Add message in first post (https://vborg.vbsupport.ru/showthread.php?t=310559)

redfinite 04-17-2014 12:53 AM

Add message in first post
 
I was hoping someone could help me with a simple mod. I would like to add a small .png graphic to the end of the first post of a thread. I dont want this repeated for the every post the threadstarter makes after this, just the original post.

The small catch is I would also like to be able to limit this feature to select forum ID's also.

I have searched but while there are a few mods based around this most highlighted the threadstarter for the whole thread and couldn't be limited to certain forums. Im hoping its just a matter of adding some code to the templates.

Thank you very much.

ForceHSS 04-17-2014 01:35 AM

Posted in wrong section try unpaid or paid section

cellarius 04-17-2014 04:30 AM

Oh, come on, Force, that's exactly what this sections here are about - people asking questions about little changes to the software. They do it all the time, and they get answers here. This one is a simple and straightforward template edit, no need for a full-blown modificaton request.

Edit your postbit and/or postbit_legacy template.

Find:
Code:

{vb:raw post.message}
After that line of code insert:
Code:

<div><vb:if condition="$post['postcount']=='1' AND in_array($thread['forumid'], array(X, Y, Z))"><img src="path/to/image.png" alt="Alt-Text" title="Your image title" /></vb:if></div>
Where X, Y, Z is a comma seperated list of Forum-IDs.

redfinite 04-18-2014 05:17 AM

Thank you very much once again cellarius for your help and kindness!


All times are GMT. The time now is 06:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00912 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete