Adding custom blocks in the board index

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
SalyaDarken
Registered User
Posts: 8
Joined: Mon Apr 22, 2019 10:10 pm
Contact:

Adding custom blocks in the board index

Post by SalyaDarken » Tue Apr 23, 2019 11:15 pm

Hi, I'm new to Phpbb and such. I'm learning things really fast. lol

But I was wondering if there was any way to get 3 or 4 text boxes in the header. Which I would like it if it's something I can add to my forum, to only show up for members.

Any help would be nice.
Last edited by HiFiKabin on Wed Apr 24, 2019 10:29 am, edited 1 time in total.
Reason: Moved to Custom Coding

User avatar
Lumpy Burgertushie
Registered User
Posts: 66230
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Adding custom blocks in the board index

Post by Lumpy Burgertushie » Wed Apr 24, 2019 4:59 pm

please explain better exactlyl what you are wanting. maybe with examples etc.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3154
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Adding custom blocks in the board index

Post by thecoalman » Thu Apr 25, 2019 5:34 am

In /includes/functions.php around line 4500 you'll find this:

Code: Select all

	// The following assigns all _common_ variables that may be used at any point in a template.
	$template->assign_vars(array(
		'SITENAME'						=> $config['sitename'],
These assign template variables, you can even create your own if you know some PHP. These are the common template variables, each page like viewtopic.php for example will have it's own list near the bottom like this. A little further down you will find this:

Code: Select all

		'S_USER_LOGGED_IN'		=> ($user->data['user_id'] != ANONYMOUS) ? true : false,
That is the template variable which is switch for logged in user.

In /styles/prosilver/template/overall_header.html find:

Code: Select all

	<div id="page-body" class="page-body" role="main">
After add:

Code: Select all

<!-- IF S_USER_LOGGED_IN -->
//Your HTML used to display text to logged in users
<!-- ENDIF -->
Save the file and uplaod to the server. Purge the cache from the ACP.

User avatar
</Solidjeuh>
Registered User
Posts: 1533
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Adding custom blocks in the board index

Post by </Solidjeuh> » Thu Apr 25, 2019 11:26 am

Can be easily done with Board Magic without editing the core files.
Register a free account & Play!!
~~~ https://www.solidjeuh.be ~~~
Have a secret? --> https://www.tellyoursecrets.eu

Post Reply

Return to “phpBB Custom Coding”