Theme.php - insert html code ONLY for last lastcom Theme.php - insert html code ONLY for last lastcom
 

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

Theme.php - insert html code ONLY for last lastcom

Started by sigepjedi, May 31, 2007, 09:19:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sigepjedi

Im trying to put some html code in which will ONLY be viewable on the lastcom segment. Looking through the sameple theme.php, there doesnt seem to be code for this section and this section only.

I also scoured the boards, unable to find this specific thing.

Thanks in advance!

Joachim Müller

Doesn't reside in theme.php. You'll have to edit include/functions.inc.php to accomplish what you're up to.

Sami

There is a simple way to do this by theme.php,
first check index.php line #821
you'll see how lastcom comes to life ;)

to achieve this you should mod theme_display_thumbnails function (copy & past it from sample theme.php to your theme.php) and add a new if statement for 'lastcom'
find this:

    if ($mode == 'thumb') {
         starttable('100%', $title, $thumbcols);


and change it to something like this

    if ($mode == 'thumb') {
         starttable('100%', $title, $thumbcols);     
         if($aid == 'lastcom'){//mod for custome html
              echo "<tr><td>your html code</td></tr>";//mod for custome html
          }//mod for custome html
       


Also you could try heredoc for more complex html code
Hope this works for you
‍I don't answer to PM with support question
Please post your issue to related board

sigepjedi

Quote from: GauGau on June 01, 2007, 08:02:12 AM
Doesn't reside in theme.php. You'll have to edit include/functions.inc.php to accomplish what you're up to.

hmmm, I thought best practices were to keep html out of such pages as functions.inc.php?
Is there a good spot perhapse, in theme.php, to place html above the output/display of the:

Quote
// Meta albums
switch($album){

created in functions.inc.php?