2018-06-26, 09:53 PM
2018-06-26, 10:15 PM
Go to your theme templates first.
Admin CP > Templates > Expand > Portal Template > Portal
Add $birthdays where you want it to display. I would place it under $whosonline
Admin CP > Templates > Expand > Portal Template > Portal
Add $birthdays where you want it to display. I would place it under $whosonline
2018-06-26, 11:34 PM
(2018-06-26, 10:15 PM)/r/ Wrote: [ -> ]Go to your theme templates first.
Admin CP > Templates > Expand > Portal Template > Portal
Add $birthdays where you want it to display. I would place it under $whosonline
This won't work. The {$birthdays} variable can only be used in the index.
You'll need a core edit to do this...
2018-06-27, 05:53 AM
please teach me
2018-06-27, 02:29 PM
It is indeed possible without any core edit.
Let me have some time to reach home and I will post the solution.
Let me have some time to reach home and I will post the solution.
2018-06-27, 04:39 PM
please effone
teach me please
teach me please
2018-06-28, 05:35 AM
Alright, so ... here is a tutorial:
First open your "index_birthdays" template and find this line at line no. 3:
Change it to:
Save the template.
Next, open your "portal_whosonline" template and add the following code at the end (don't delete existing code, you need to add at the end):
Save the template and you are done.
Result:
First open your "index_birthdays" template and find this line at line no. 3:
<td class="trow1"><span class="smalltext">{$bdays}</span></td>
Change it to:
<td class="trow1"><span class="smalltext" id="bdays">{$bdays}</span></td>
Save the template.
Next, open your "portal_whosonline" template and add the following code at the end (don't delete existing code, you need to add at the end):
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>Today's Birthdays</strong></td>
</tr>
<tr>
<td class="trow1">
<span class="smalltext" id="pbdays"></span>
</td>
</tr>
</table>
<br />
<script>jQuery(function(){jQuery("#pbdays").load("{$mybb->settings['bburl']}/index.php #bdays")});</script>
Save the template and you are done.
Result:
2018-06-28, 06:10 AM
Thanks boss
2018-06-28, 08:48 AM
Would there be a way to make the table header use the language variable
{$lang->todays_birthdays}
there?2018-06-28, 09:07 AM
If you set the ID to <tr> in 'index_birthdays' template (<tr id="bdays">) instead of the span you will get the entire chunk of the birthday block.
Problem is the "Today's Birthdays" will appear in 'tcat' class (black line) instead of 'thead' (blue line) which you then need to further restyle to match with other blocks.
Alternate method is to pull the language var value with same technique using different id but I will not recommend this as this is not worth for the code it is gonna run in background slowing down your page load (negligible, but still).
Problem is the "Today's Birthdays" will appear in 'tcat' class (black line) instead of 'thead' (blue line) which you then need to further restyle to match with other blocks.
Alternate method is to pull the language var value with same technique using different id but I will not recommend this as this is not worth for the code it is gonna run in background slowing down your page load (negligible, but still).