Previous Thread
Next Thread
Print Thread
Rate Thread
#271759 03/31/2004 1:42 PM
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Is there a way to comment out a portion of the UBBTPRINT stuff so that I can drop a quick PHP query into a template, or would have to edit the php script itself?

Basically I want to add something:

<!-- <? //UBBTREMARK -->
<!-- echo <<<UBBTPRINT -->

$tbopen
<tr>
<td class="tdheader">
{$ubbt_lang['PROF_FOR']} $profileuser
</td>
</tr>
$tbclose

$tbopen
<tr>
<td class="lighttable"><table border="0" width="100%" class="lighttable" cellpadding="0">
<tr>
<td width="10%" class="darktable">
{$ubbt_lang['TEXT_EMAIL']}
</td>
<td width="40%">
<a href="mailto:$Fakeemail">$Fakeemail</a>

</td>
<td align="right" valign="top" rowspan="12">
<img src="$Picture" alt="Picture" width="$width" height="$height" />

RIGHT HERE...but it would involve a query

</td>
</tr>
<tr>
<td class="darktable">
{$ubbt_lang['MEMBER_ID']}
</td>
<td>
$User

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I would personally do the query in the actual php script and then link to it in the template.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Aye, that is the easy way...but what I explained to the few people that want this, is I have to add the php code and modify the template each time I upgrade the boards.

Which is a pain in the arse!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Actually in any template - you can go back into php mode with this code:



UBBTPRINT; //UBBTREMARK

// put your php code here

echo <<<UBBTPRINT


Edit the file directly - don't use the online editor for doing PHP code.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
yeah but Josh would you put a db query in a template? or in the actually file that calls the template?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It's best in the script - but it's possible to put actual code and queries into the template. So it's "neater" not to have it in the template, but it works.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
And for the one query "check" and link I will output...that will work well.

Thanks Josh...all that UBBTPRINT; //UBBTREMARK stuff makes my head hurt. I know php fairly well...but have not sat down to figure that stuff out yet.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)