anycontent.php anycontent.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

anycontent.php

Started by CaptainBlue, February 18, 2005, 03:07:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CaptainBlue

I've added anycontent.php to my page layout and that's fine.

But now I want two tables of information, so I've written it like this:
<?php
starttable
("100%""Latest Trackday Photos");

?>

<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable
();
?>


<?php
starttable
("100%""Notes");

?>

<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable
();

?>



Now that works OK, but I'd like to add the equivalent of two or three line breaks between the two tables. What's the syntax for this? Any help much appreciated.
Richard Morris

CaptainBlue

As a temporary workaround, I've added this code:
<?php echo '-'?>

This puts a hyphen in between the two tables - using simply
<?php echo ' '?>
did nothing.
Richard Morris

Joachim Müller

#2
Just use plain html:
Quote<?php
starttable("100%", "Latest Trackday Photos");

?>
<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable();
?>
<br />&nbsp;<br />&nbsp;<br />
<?php
starttable("100%", "Notes");

?>
<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable();

?>

Using PHP would be the very same thing: just make it output the line breaks, like this[quote]<?php
starttable
("100%""Latest Trackday Photos");
?>

<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable
();
print 
'<br />&nbsp;<br />&nbsp;<br />';
starttable("100%""Notes");
?>

<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable
();
?>


You have to understand how PHP works: just like in html, where commands between < and > are used to delimit page content from tags, PHP is being switched on and off using <?php and ?>. Recommended reading to get you started: http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode

Joachim[/quote]

CaptainBlue

Thanks for that: I'd tried adding some line breaks but they'd failed for me. The PHP option worked, however, with just one line break being needed so the code now goes like this:
<?php
starttable
("100%""Latest Trackday Photos");

?>

<tr><td class="tableb" >
<ul>
<li>The day after each Folly trackday, we'll be adding a hyperlink in this section that links to DE Photo's
website from where you'll be able to order prints</li>
</ul>
</td></tr>
<?php
endtable
();
print 
'&nbsp;<br />';

starttable("100%""Notes");

?>

<tr><td class="tableb" >
<ul>
<li>Registered and logged-in users can send photos as e-cards<br />
- makes a change from cartoons or slick commercial ones!</li>
<li>Your e-card recipient's details will not be used or sold on by the Motorcycle Folly</li>
</ul>
</td></tr>
<?php
endtable
();

?>

Richard Morris