Clan Adverts

PHP Web Host - Quality Web Hosting For All PHP Applications

 

www.clan-themes.co.uk :: View topic - Whats the best way to make your custom block from scratch

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Whats the best way to make your custom block from scratch

2 Replies / 332 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » Blocks

View previous topic :: View next topic


visual_productions
Reputation: 0.1
Local time: 7:19 AM

usa.gif

Status: Offline
0.01 posts per day
Medals: 0

Joined: Jul 07, 2008
Last Visit: 07 Jul 2008
Posts: 1
Points: 250 

View user's profileSend private messageVisit poster's website Reply with quote

floppy
Reputation: 1792.2
votes: 10
Local time: 7:19 AM
Location: Jackson Mississippi
usa.gif

Status: Offline
2.78 posts per day
Medals: 1 (View more...)
Dedicated User (Amount: 1)
Clan Themes Scripts/Coder
Clan Themes Scripts/Coder
Joined: Nov 14, 2006
Last Visit: 22 Nov 2008
Posts: 2054
Points: 2620 

View user's profileSend private messageVisit poster's website Reply with quote

Ped
Reputation: 334.7
votes: 17
Local time: 1:19 PM
Location: Great British Empire
uk.gif

Status: Offline
2.36 posts per day
Medals: 2 (View more...)
Forums MoD (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 23 Nov 2008
Posts: 1746
Points: 15173 

Post Re: Whats the best way to make your custom block from scratc Posted: Mon Jul 07, 2008 7:09 pm   

lol took me about 12 months to work that out you know..

As floppy says..

this is an example, lets just say were going to make 2 tables with 2 columns in each table

this is the code im going to place into the link above (to the block maker)

Code:
<table border="1" width="100%">
   <tr>
      <td>Some text here</td>
      <td>And some more text here</td>
   </tr>
</table>
<br />
<table border="1" width="100%">
   <tr>
      <td>Some text here</td>
      <td>And some more text here</td>
   </tr>
</table>


Very straight forward.. until we convert it and actually take a closer look at the code in detail

here it is
Code:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) updated for nuke patch by Mental Modz ###
if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}
$content  =  "<table border=\"1\" width=\"100%\">";
$content  .= "<tr>";
$content  .= "   <td>Some text here</td>";
$content  .= "   <td>And some more text here</td>";
$content  .= "</tr>";
$content  .= "/table>";
$content  .= "br />";
$content  .= "table border=\"1\" width=\"100%\">";
$content  .= "<tr>";
$content  .= "   <td>Some text here</td>";
$content  .= "   <td>And some more text here</td>";
$content  .= "</tr>";
$content  .= "/table>";
?>


Looks great to a novice ! but if you actually look it has removed some of the first letters (in this case just a < ) of code of certain lines. normally just subsequent first letters that are placed on the first line in this case
Code:
$content  .= "/table>";
$content  .= "br />";
$content  .= "table border=\"1\" width=\"100%\">";


and
Code:
$content  .= "/table>";


this can be extremely annoying when making blocks that have java i found the actual easiest to combat it is when pasting the code into the first box, just add a space to the offending lines BEFORE you hit convert..

Obviously the best way is to just play, but at least you now know before it actually happens !

so my amended code to paste into the converter would be like so

Code:
 <table border="1" width="100%">
   <tr>
      <td>Some text here</td>
      <td>And some more text here</td>
   </tr>
 </table>
 <br />
 <table border="1" width="100%">
   <tr>
      <td>Some text here</td>
      <td>And some more text here</td>
   </tr>
 </table>


note how i just added a space Dont Know hope ive not confused you Dont Know
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote



Post new topic   Reply to topic  
   www.clan-themes.co.uk Forum Index » Blocks


 
2 Replies / 332 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum