Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-04-2012, 01:43 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Original Poster Mod

Is there a modification to show the op throughout the thread?
Reply With Quote
  #2  
Old 08-04-2012, 09:03 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know about a mod but it's a fairly simple template edit.

Code:
<vb:if condition="$thread['postusername'] == $post['username']"> ORIGINAL POSTER</vb:if>
Replace ORIGINAL POSTER with whatever you want, text, an image, whatever.

Put that code anywhere in your postbit or postbit_legacy template.
Reply With Quote
Благодарность от:
TheInsaneManiac
  #3  
Old 08-04-2012, 07:28 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. That's awesome and works perfectly!
Reply With Quote
Благодарность от:
BirdOPrey5
  #4  
Old 12-18-2012, 07:52 AM
puertoblack2003's Avatar
puertoblack2003 puertoblack2003 is offline
 
Join Date: Aug 2005
Location: Philadelphia
Posts: 1,073
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
I don't know about a mod but it's a fairly simple template edit.

Code:
<vb:if condition="$thread['postusername'] == $post['username']"> ORIGINAL POSTER</vb:if>
Replace ORIGINAL POSTER with whatever you want, text, an image, whatever.

Put that code anywhere in your postbit or postbit_legacy template.
thanks for this i was wondering if that was a mod.But a simple tweak:up:. I tweaked it a bit more for my forum and sharing is caring

for those that would like this simple tweak thanks to BirdOPrey

in postbit_legacy look for this line

Quote:
<div class="postdetails">
<div class="userinfo">
<div class="username_container">
<vb:if condition="$post['userid']">
{vb:raw memberaction_dropdown}
{vb:raw post.onlinestatus}
<!-- original poster mod by BirdOPrey5 https://vborg.vbsupport.ru/showthread.php?t=286290 -->
<span class="originalposter"><vb:if condition="$thread['postusername'] == $post['username']"> [OP]</vb:if></span>
<!-- original poster mod by BirdOPrey5 https://vborg.vbsupport.ru/showthread.php?t=286290 -->

<vb:else />
<span class="username guest">{vb:raw post.musername}</span>
</vb:if>
</div>
just copy what's in red and paste it after {vb:raw post.onlinestatus} then save.

in additional css put this at the bottom. change color to your liking..

Quote:
/* BirdOPrey5-original poster tweak */

.originalposter {
color: #c02525;
font-size: 14px;
font-weight: 700;
}

see attached image enjoy!!!

Attachment 142952
Reply With Quote
Благодарность от:
BirdOPrey5
  #5  
Old 02-14-2013, 02:11 PM
DannyITR DannyITR is offline
 
Join Date: Jan 2002
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to remove this for the first post? It would look a lot nicer.

--------------- Added [DATE]1360856033[/DATE] at [TIME]1360856033[/TIME] ---------------

Figured it out (added bold text)

Code:
<vb:if condition="($post[postcount] != '1')">
<span class="originalposter"><vb:if condition="$thread['postusername'] == $post['username']">[OP]</vb:if></span>
</vb:if>
Reply With Quote
  #6  
Old 08-23-2014, 06:37 PM
thetechgenius's Avatar
thetechgenius thetechgenius is offline
 
Join Date: Jun 2014
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made the "[OP]" a link, that links to all the User's Posts. Also, when you hover over the [OP] it says "Original Poster", see the Title Tag.


This is my code:

Code:
<vb:if condition="$thread['postusername'] == $post['username']"><span class="ttg_org_poster"><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;contenttype=vBForum_Post&amp;showposts=1" title="Original Poster"> [OP]</a></span></vb:if>

CSS:

Code:
/* TTG Original Poster - Postbit Legacy */

.ttg_org_poster {
color: #d14a10; /* Change this color to match your style  */
font-size: 9px;
font-weight: bold;
font-style: italic;
}

/* TTG Original Poster - Postbit Legacy */
Check the attached image for a screenshot.
Attached Images
File Type: png op.png (93.9 KB, 0 views)
Reply With Quote
  #7  
Old 12-12-2014, 11:16 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just "compressed" conditions for showing who's original author and avoiding it in the first post of the thread:

Code:
<vb:if condition="($thread['postusername'] == $post['username']) AND ($post[postcount] != '1')"><span class="originalposter">Original poster</span></vb:if>
This is just to avoid having two vb:ifs, previous work from DannyITR works just fine.

EDIT:

I also thought that it could be interesting to add another function, to link threads opened by this particular user, instead to link posts of this user as @thetechgenius made.

If you want to point to threads of a user use this code:

Code:
<vb:if condition="($thread['postusername'] == $post['username']) AND ($post[postcount] != '1')"><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;starteronly=1&amp;contenttype=vBForum_Thread" title="Other threads by this user" target="_blank"><span class="originalposter">Original poster</span></a></vb:if>
And if you want to control link, i.e. how it looks when mouse hovers on it, use this in additional.css:

Code:
.originalposter:hover{
 color: gold;
}
Of course, you can choose your desired CSS controls.

Now you can choose if you want just plain original poster sign, or if it also leads to user's posts (credits go to thetechgenius), or it leads to threads created by user.

And of course, all credits for this great idea go to BirdOPrey5. Thank you man. :up:

EDIT2:

And just in case you want to use user name in title of link, use this code there in appropriate place:

Code:
{vb:raw post.username}
For example:

Code:
<vb:if condition="($thread['postusername'] == $post['username']) AND ($post[postcount] != '1')"><a href="search.php?{vb:raw session.sessionurl}do=finduser&amp;userid={vb:raw post.userid}&amp;starteronly=1&amp;contenttype=vBForum_Thread" title="Other threads by user {vb:raw post.username}" target="_blank"><span class="originalposter">Original poster</span></a></vb:if>
Reply With Quote
  #8  
Old 12-12-2014, 11:18 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wrote a mod like this when I was with DBTech, [DBTech] Original Poster In Postbit v1 (vB4)
Reply With Quote
  #9  
Old 12-13-2014, 01:13 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I didn't saw your mod under DBTech.

Anyway, I played a bit with template edit, as you can see. And of course, you know why I can't like your post at the moment.
Reply With Quote
  #10  
Old 11-18-2017, 12:11 AM
thetechgenius's Avatar
thetechgenius thetechgenius is offline
 
Join Date: Jun 2014
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is an old thread, but I would like to add to it.

The above code just shows "[OP]" next to the original poster's username in a thread.

The code below will make the "[OP]" a clickable link that will link to the Original Post in that thread.

Here is my code:

Code:
<span class="originalposter"><vb:if condition="$thread['postusername'] == $post['username']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}#post1"> [OP]</a></vb:if></span>
As you can see, it will link to "#post1" in the thread.
Reply With Quote
Благодарность от:
blind-eddie
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:48 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04522 seconds
  • Memory Usage 2,292KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (11)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete