Viewtopic Birthday

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
ham1299
Registered User
Posts: 613
Joined: Mon Sep 11, 2006 2:12 am
Location: USA
Contact:

Re: Viewtopic Birthday

Post by ham1299 »

Brogan wrote:Nice mod.

I have however edited common.php so it displays Happy Birthday on mouseover of the cake icon:

Code: Select all

	'VIEWTOPIC_BIRTHDAY'	=> 'Happy Birthday',
Is there any way of adding the user ID to the end of that string?
I've tried various things but can't get it to display e.g. Happy Birthday Brogan.

--
Oooh, I like that! :D Thanks.
Heather
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Viewtopic Birthday

Post by igorw »

Replace the language with this:

Code: Select all

'VIEWTOPIC_BIRTHDAY'   => 'Happy Birthday %s',
And in viewtopic.php, replace this:

Code: Select all

'BIRTHDAY_IMG'		=> $user_cache[$poster_id]['viewtopic_birthday'] ? $user->img('icon_birthday', 'VIEWTOPIC_BIRTHDAY') : false,
With:

Code: Select all

'BIRTHDAY_IMG'		=> $user_cache[$poster_id]['viewtopic_birthday'] ? $user->img('icon_birthday', sprintf($user->lang['VIEWTOPIC_BIRTHDAY'], $user_cache[$poster_id]['username'])) : false,
See how that goes. :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
Brogan
Registered User
Posts: 479
Joined: Thu Jul 10, 2008 10:12 pm
Location: Docklands, London, UK

Re: Viewtopic Birthday

Post by Brogan »

Excellent stuff! :D
nouveau
Registered User
Posts: 256
Joined: Tue Mar 27, 2007 1:51 pm

Re: Viewtopic Birthday

Post by nouveau »

Nice MOD Evil,

couldn't see any subsilver2 edits, so have put them up here.

subsilver2 edits

Copy: root/styles/prosilver/imageset/icon_birthday.gif

To: styles/subsilver2/imageset/icon_birthday.gif

open styles/subsilver2/imageset/imageset.cfg
find

Code: Select all

img_icon_topic_unapproved = icon_topic_unapproved.gif*18*19
after add

Code: Select all

img_icon_birthday = icon_birthday.gif*40*40
open styles/subsilver2/template/viewtopic_body.html
find

Code: Select all

					<!-- END custom_fields -->
after add

Code: Select all

					<!-- IF postrow.BIRTHDAY_IMG -->
					<br />&nbsp;
					<br />{postrow.BIRTHDAY_IMG}
					<!-- ENDIF -->	
refresh the styles and imageset and it should now display on subsilver2
Formerly known as xceler8shun
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Viewtopic Birthday

Post by igorw »

Cool, thanks! I've added a link in the first post. :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
SSC streezer
Registered User
Posts: 98
Joined: Wed Jun 04, 2008 7:36 am
Location: Zug, Switzerland
Contact:

Re: Viewtopic Birthday

Post by SSC streezer »

on mine it isn't working - i made all the changes but it doesnt work :(
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Viewtopic Birthday

Post by iftitaj »

SSC streezer wrote:on mine it isn't working - i made all the changes but it doesnt work :(
refresh imageset of your style & purge your cache. ;)
SSC streezer
Registered User
Posts: 98
Joined: Wed Jun 04, 2008 7:36 am
Location: Zug, Switzerland
Contact:

Re: Viewtopic Birthday

Post by SSC streezer »

iftitaj wrote:
SSC streezer wrote:on mine it isn't working - i made all the changes but it doesnt work :(
refresh imageset of your style & purge your cache. ;)
i refreshed my template in the ACP - it still doesn't work
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Viewtopic Birthday

Post by iftitaj »

SSC streezer wrote:
iftitaj wrote:
SSC streezer wrote:on mine it isn't working - i made all the changes but it doesnt work :(
refresh imageset of your style & purge your cache. ;)
i refreshed my template in the ACP - it still doesn't work
I'm talking about refreshing IMAGESET not TEMPLATE. ;)
Budde
Registered User
Posts: 40
Joined: Tue Oct 30, 2007 9:59 pm

Re: Viewtopic Birthday

Post by Budde »

I can't find the following code in the viewtopic.php file:

Code: Select all

'POSTER_AGE'		=> $user_cache[$poster_id]['age'],
After that I am suppose to put:

Code: Select all

// viewtopic birthday
		'BIRTHDAY_IMG'		=> $user_cache[$poster_id]['viewtopic_birthday'] ? $user->img('icon_birthday', 'VIEWTOPIC_BIRTHDAY') : false,
I can't because I can't find the first piece of code in the viewtopic.php file.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Viewtopic Birthday

Post by igorw »

It's on line 1397.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Budde
Registered User
Posts: 40
Joined: Tue Oct 30, 2007 9:59 pm

Re: Viewtopic Birthday

Post by Budde »

eviL<3 wrote:It's on line 1397.
Thanks! Got it working.
SSC streezer
Registered User
Posts: 98
Joined: Wed Jun 04, 2008 7:36 am
Location: Zug, Switzerland
Contact:

Re: Viewtopic Birthday

Post by SSC streezer »

iftitaj wrote:
SSC streezer wrote:
iftitaj wrote:
SSC streezer wrote:on mine it isn't working - i made all the changes but it doesnt work :(
refresh imageset of your style & purge your cache. ;)
i refreshed my template in the ACP - it still doesn't work
I'm talking about refreshing IMAGESET not TEMPLATE. ;)
ah ok - now it works - thx ;)

can i align the picture to center? where do i have to change that?
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Viewtopic Birthday

Post by iftitaj »

SSC streezer wrote:can i align the picture to center? where do i have to change that?
You have added this code in styles/prosilver/template/viewtopic_body.html

Code: Select all

		<!-- IF postrow.BIRTHDAY_IMG -->
		<dd>&nbsp;</dd>
		<dd>{postrow.BIRTHDAY_IMG}</dd>
		<!-- ENDIF -->
Replace it with:

Code: Select all

		<!-- IF postrow.BIRTHDAY_IMG -->
		<dd>&nbsp;</dd>
		<dd><div style="text-align:center">{postrow.BIRTHDAY_IMG}</div></dd>
		<!-- ENDIF -->
Try this ... it should center the picture.

Let us know about your experience. I haven't tried it but it should work.

P.S. Don't forget to purge the cache.
Last edited by iftitaj on Thu Aug 21, 2008 6:53 pm, edited 1 time in total.
SSC streezer
Registered User
Posts: 98
Joined: Wed Jun 04, 2008 7:36 am
Location: Zug, Switzerland
Contact:

Re: Viewtopic Birthday

Post by SSC streezer »

buuuja xD works - thx @ iftitaj :D

it worked with the div tags....
Locked

Return to “[3.0.x] MOD Database Releases”