vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Display Enhancements - Thread Age Insert for vB 4 (https://vborg.vbsupport.ru/showthread.php?t=259308)

Boofo 02-22-2011 10:00 PM

Thread Age Insert for vB 4
 
1 Attachment(s)
Thread Age Insert for vB 4
Version 1.0.2
(By Boofo)

What does this product do?
This product will calculate the age of a thread, in days, and insert it after the thread title or start date in the listing.

Examples:
---------------------------
In forumdisplay:
Testing days old after thread title ? Today <=This will display in bold text
Testing bbcode ? 1 day old
Testing something... ? 16 days old

In showthread:
Thread: Testing days old after thread title ? 12 days old

Credits:
Thanks goes out to Adrian for showing me a new way to do template edits and style variables in products.

Version Information:
Version 1.0.0 --Initial release for vB 4
Version 1.0.1 --Code optimized and days calculation rewritten to avoid any future gregoriantojd errors with certain installations. Added location setting where the thread age can be added either after the thread title or after the start date line. Added a font color setting and removed the span class highlight code.
Version 1.0.2 --Removed font color setting and added Style Variable setting for the Thread Age Insert Font Color, so it can be set for each style separately. Added the Thread Age in the showthread at the top after the thread title, if you are using the "After thread title" option.

Installation Overview:
---------------------------
1 Product XML (3 Plugins, 10 Phrases, 1 Setting, 1 Style Variable)

Installation Instructions:
---------------------------
1. Go to your Admin CP
Scroll down to 'Plugin System'
Click 'Manage Products'
Click 'Add/Import Product'
Click the 'Browse' button, and locate the product-boofo_threaddays.xml file on your computer

2. Go to your Admin CP -> vBulletin Options -> 'Thread Age Insert' and set the following options:
Thread Age Insert Location: Choose which location you want the thread age to display. (Default is off, Do not show thread age.)

3. Go to your Admin CP -> Styles & Templates -> Style Manager -> StyleVars (In the All Style Options drop-down) -> Threadbit -> boofo_threaddays_color
Enter the color code of the font color that you want the Thread Age to show up in.

NOTE: You will need to do this for all styles.
------------------------------------------------------

Done!
Enjoy!


Code:

if ($mark_as_installed != 'clicked')
{
        $you_get = 'squat';
}
else
{
        $you_get = 'support';
}


Swordman844555 02-23-2011 09:45 AM

Thx great!

Alecsmith 02-23-2011 11:44 AM

Tagged for now :D

Juggernaut 02-23-2011 11:48 AM

Does this use phrases for translations or would I need to edit the templates or xml file?

Boofo 02-23-2011 12:12 PM

From the first post: 1 Product XML (2 Plugins, 3 Phrases)

Gemma 02-23-2011 12:43 PM

Thank you :)

COL NIL SATIS 02-23-2011 01:10 PM

Boofo will this work on 4.0.6??

Boofo 02-23-2011 01:15 PM

It should, yes.

COL NIL SATIS 02-23-2011 01:38 PM

Quote:

Originally Posted by Boofo (Post 2165797)
It should, yes. This was one of my old 3.5 mods I accidentally found last night and decided to convert. ;)


Great stuff,will try it now and let you know,cheers Boofo mate:)

COL NIL SATIS 02-23-2011 01:46 PM

confirm it works flawlessly on 4.0.6...great work Boofo thanks

ellinofatsa 02-23-2011 02:22 PM

hi i have vb 4,1,2 and i have instal this hack and i see this mesage after,,,

Warning: gregoriantojd() expects parameter 1 to be long, string given in [path]\includes\functions_forumdisplay.php(498) : eval()'d code on line 40

Boofo 02-23-2011 03:31 PM

Quote:

Originally Posted by ellinofatsa (Post 2165821)
hi i have vb 4,1,2 and i have instal this hack and i see this mesage after,,,


Warning: gregoriantojd() expects parameter 1 to be long, string given in [path]\includes\functions_forumdisplay.php(498) : eval()'d code on line 40

What version of PHP are you using?

ellinofatsa 02-23-2011 05:17 PM

Quote:

Originally Posted by Boofo (Post 2165843)
What version of PHP are you using?

PHP 5.2.11

Boofo 02-23-2011 05:22 PM

Thanks. I will see what I can figure out for you as I have not run into this before. Hang tight. ;)

ALBCODERS 02-23-2011 05:29 PM

installed works well on vb 4.0.3 but this mod shows only days.would be nice to show months and years.

Boofo 02-23-2011 05:37 PM

That would take a lot more calculations as you would have to allow for leap years, etc. I think it would be more hassle than it is worth for a free mod.

spillage 02-23-2011 11:32 PM

Maybe have an age cut off setting... anything older than the cut off just shows "older than XX days".

TheLastSuperman 02-23-2011 11:43 PM

Mikey likey :D.

TBforums 02-24-2011 04:24 AM

This looks nice but I decided not to install this because it may discourage users not to view certain threads because of its age.

Randomm 02-25-2011 06:25 AM

Can somebody help me with this? is this a simple importing of the xml file? what does (2 Plugins, 3 Phrases) mean?
This is a great mod btw

Boofo 02-25-2011 06:48 AM

Just follow the Installation Instructions in the first post and you will be fine. The 2 Plugins, 3 Phrases is for information purposes only. Also, you might want to click the install button so you can be notified of any updates to this mod.

cravendale 02-25-2011 10:11 PM

Hi,

Confused...
Started by xxxx, 1 Week Ago 06:49 AM
but the script shows - 10 days old ???

cravendale 02-25-2011 10:12 PM

Also how can I change the colour of hte highlighted text ?

thanks

Boofo 02-25-2011 11:08 PM

Quote:

Originally Posted by cravendale (Post 2166940)
Hi,

Confused...
Started by xxxx, 1 Week Ago 06:49 AM
but the script shows - 10 days old ???

The days are correct. Try setting Datestamp Display Option to Yesterday / Today instead of Detailed.
Quote:

Originally Posted by cravendale (Post 2166942)
Also how can I change the colour of hte highlighted text ?

thanks

You'd have to change that in the xml file. It goes off of whatever you have set for highlight on your site.

bulldog51981 02-26-2011 01:16 AM

Installed and worked on default skin but not my custom skins. When I disable then re-enable, it shows the going through and altering the custom skins but there no change. Any idea why?

Boofo 02-26-2011 01:44 AM

Apparently the line is looks for to add the Thread Age to is different in the custom skins. It was designed on the default skin.

bulldog51981 02-26-2011 05:51 PM

What is the line that it adds in the default skins? If I knew what to search for I could add it into the correct place in modified ones to have it displayed.

mgurain 03-02-2011 06:28 AM

I suggest to put a small icon that indicate an old thread (old thread is controlled by setting) ?

bulldog51981 03-02-2011 04:12 PM

Just happened to find this today by accindent...I did a search by keyword and on the results page....there was the thread age right next to the title. So what do I need to add to the showthread template to get this result there as well. If it works on the results template, it should work on the others with no problem.

elwachiman 03-02-2011 06:23 PM

Excelent Good Mod..

Boofo 03-02-2011 07:40 PM

Quote:

Originally Posted by bulldog51981 (Post 2168763)
Just happened to find this today by accindent...I did a search by keyword and on the results page....there was the thread age right next to the title. So what do I need to add to the showthread template to get this result there as well. If it works on the results template, it should work on the others with no problem.

What do you mean it "should work on the others"? It works exactly as designed.

bulldog51981 03-03-2011 02:11 PM

I just mean that if it works on the search results page then I should be able to get it to work on the "SHOWTHREAD" page. Just need to know what line it adds and/or where.

**Edit - Using the:

Admincp->Options->Thread Age Insert

I was able to get it to show after the thread start date, just not the title. This is what I was looking for anyway, so it works perfectly for me.

Thanks BooFo! You're mods are always GREAT! Keep up the good work, we all appreciate it!

Boofo 03-03-2011 02:37 PM

You are using a custom skin, aren't you?

It shouldn't be showing on the showthread, anyway, as that is where the posts show. It is set to the templates that the thread titles show up in.

p@ndu 03-03-2011 05:24 PM

is it not possible to show after the username as i have removed the thread start date

Boofo 03-03-2011 05:29 PM

Quote:

Originally Posted by downloadsmasti (Post 2169183)
is it not possible to show after the username as i have removed the thread start date

I don't understand what you mean by you "removed the thread start date".

p@ndu 03-03-2011 05:43 PM

1 Attachment(s)
in below picture i wanted it their is it possible

only username will be displayed i want after tht

Boofo 03-03-2011 08:03 PM

Not possible since you removed the start date as that is what it looks for on that line.

Randomm 03-06-2011 03:56 PM

Great mod
Installed, rated and nominated.
Are you going to release an update that will change it from showing in days to (days, weeks, months, years)?

Boofo 03-06-2011 09:42 PM

Quote:

Originally Posted by Randomm (Post 2170248)
Are you going to release an update that will change it from showing in days to (days, weeks, months, years)?

Not planning to at this point.

Krusty1231 03-06-2011 09:47 PM

1 Attachment(s)
This only calculates the age of the first post in a thread right?

Just making sure I am doing it right.


All times are GMT. The time now is 04:57 PM.

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.01407 seconds
  • Memory Usage 1,808KB
  • 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
  • (1)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete