Page 1 of 1

How do you make multiple custom blocks

Posted: 31. January 2009 06:31
by Rattman
Your Portal Version: 1.0.2
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Basic Knowledge
Boardlink: http://nbkillas.com/forum/

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
If you look at my board I have a Gametracker small custom block...

I also have another one under it that I got there with a simple copy paste in the portal body.html...the problem is that I can't edit the settings of the second box as to what server is displayed inn that box

Is there a way to make multiple custom blocks that i can add these servers to my portal with??

Re: How do you make multiple custom blocks

Posted: 1. February 2009 01:55
by Mike
You have to make two separate Blocks in your Blocks folder (just make a copy and rename it). Give them separate names, and include both of them in your portal_body.html ;)

Re: How do you make multiple custom blocks

Posted: 1. February 2009 03:56
by Rattman
That works great Thanks for the help

Re: How do you make multiple custom blocks

Posted: 9. February 2009 19:07
by kb0000
I also want to do the same thing. I have made another copy of custom_small as custom_small_2.html
I have included both the files in portal_body.html

But the text and heading shown is same. What I need to do, also the new page settings is not coming in the .Mods section.

Re: How do you make multiple custom blocks

Posted: 9. February 2009 19:12
by Mike
No... thats right....
At this time, additional Custom Blocks wont be available in the ACP. You have to edit it by Hand, and copy your Text and Headline in there ;)

Re: How do you make multiple custom blocks

Posted: 14. February 2009 16:26
by nedumeritu
Mike wrote:You have to make two separate Blocks in your Blocks folder (just make a copy and rename it). Give them separate names, and include both of them in your portal_body.html ;)
Sorry to tell you that there is nothing tro understand from your explanations.
I did all the steps but nothing is working.
Now I have to clean all the mess I have done in all my phpBB and Portal.
No ofense, nothing personal, but first of all, even your proposal is a working one,
you have to explain it more clearly, inn that way so that even you to understand your explanations. ;)
If I receive a serious sollution I can even make a donation but not for something that is
spoiling my work.

Re: How do you make multiple custom blocks

Posted: 15. February 2009 02:15
by Mike
My "explanation" was an answer of rattmans question. And not a general "how to".
He understand what to do, and because of this you cannot say, that there is "nothing to understand".
If you have any trouble, ask your question. Otherwise nobody can help you.

-What do you want,
-What have you done,
-and what did not work?

Re: How do you make multiple custom blocks

Posted: 15. February 2009 19:26
by Greight
Ca u please tell me how I can do that step by step ?
I copied the file but I dont know where to I should add it in the portal_body.html and how I can edit it so that my text is displayed.
Thx in advance

Re: How do you make multiple custom blocks

Posted: 16. February 2009 00:00
by thomas.d
You include your custom block(s) in portal_body.html exactly there where you want them to be displayed like this

Code: Select all

<!-- INCLUDE portal/block/your_block.html --> 
Purge template- and theme cache after uploading the altered file/s.

Re: How do you make multiple custom blocks

Posted: 16. February 2009 00:16
by Mike
You have to copy your Text in your copy of the Block you made.
This is an example of the custom_center.html from subsilver2. Your block may look different, but you should know what i mean...

Code: Select all

<!--version $Id: custom_center.html 216 2008-04-29 07:23:22Z kevin74 $ //-->
<table class="tablebg" cellspacing="1" width="100%">
	<tr>
		<th>{PORTAL_CUSTOM_CENTER_HEADLINE}</th>
	</tr>
	<tr class="row1">
		<td style="padding:5px 5px 5px 5px;">
			<div class="postbody">
				{PORTAL_CUSTOM_CENTER_CODE}
			</div>
		</td>
	</tr>
</table>
<br />
Copy the Content of this block, Create a new file, called "custom_center_2.html" and paste the conten in there...
Then you can paste your text like this:

Code: Select all

<!--version $Id: custom_center.html 216 2008-04-29 07:23:22Z kevin74 $ //-->
<table class="tablebg" cellspacing="1" width="100%">
	<tr>
		<th>put_your_Headline_here</th>
	</tr>
	<tr class="row1">
		<td style="padding:5px 5px 5px 5px;">
			<div class="postbody">
				pur_your_text_here
Lorem ipsum dolor sit amet, consectetuer sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
			</div>
		</td>
	</tr>
</table>
<br />
Then open your portal_body.html and look for this line:

Code: Select all

<!-- [+] center block area -->
After this you see all the block includes within switches. If you add an customblock it only works without such a switch.
Put in the block where you want it to have like this:

Code: Select all

            <!-- INCLUDE portal/block/custom_center_2.html -->
Thats all... ;)

EDIT: Thomas was faster again... :)

EDIT2: and of course:
thomas.d wrote:Purge template- and theme cache after uploading the altered file/s.