Advertisement:

Author Topic: Where is the file loop-single.php ?  (Read 1271 times)

venus

  • Newbie
  • *
  • Posts: 23
Where is the file loop-single.php ?
« on: June 08, 2014, 07:35:50 pm »
There's been so many references of loop-single.php
I have searched everywhere so many times but still cannot find this elusive file /oc-content/themes/bender/loop-single.php
I use bender 0.9

I want to insert this code there:

$datenow = new DateTime('NOW');
                                        $itemdate = new DateTime(substr(osc_item_field('dt_pub_date'),0,10));
                                        $ddate = date_diff($itemdate,$datenow);

                                        //wait 2 days before item can be renewed
                                        if ($ddate->days >= 2) { ?> 
                                            <a href="<?php echo osc_item_renew_url(); ?>" rel="nofollow"><?php _e('ReNew', 'bender'); ?></a>
                                            <span>|</span>
                                        <?php }

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Where is the file loop-single.php ?
« Reply #1 on: June 08, 2014, 07:55:20 pm »
Hi,

No loop-single.php on Bender 0.9, it was introduced in later versions.

I think what you're looking for is bender_draw_item($class = false,$admin = false) function in functions.php

Regards


venus

  • Newbie
  • *
  • Posts: 23
Re: Where is the file loop-single.php ?
« Reply #2 on: June 08, 2014, 08:10:45 pm »
I have finally locate that elusive file at /oc-includes/osclass/gui/loop-single.php

venus

  • Newbie
  • *
  • Posts: 23
Re: Where is the file loop-single.php ?
« Reply #3 on: June 08, 2014, 08:16:25 pm »
Hi,

No loop-single.php on Bender 0.9, it was introduced in later versions.

I think what you're looking for is bender_draw_item($class = false,$admin = false) function in functions.php

Regards

Thanks, teseo I'll go look at that file