How do I remove the "This listing expires…" text?

  • Stoly
    Stoly
    Senior Member
     
    159 points

    How do I remove this section/text in the listings?

    ” This listing expires in “” days “” hours “” minutes ” in the listings section so it does not display?

    Thanks.

    Attachments:
    You must be logged in to view attached files.

    JamesD
    JamesD
    Titan
     
    655 points

    Hello Stoly,

    A core file would need to be edited, which isn’t recommended and discouraged.

    However, if you still wanted to do it….

    The quickest way would probably be by adding one line to the ‘/AT/framework/class/class_core.php’. After you’ve made a backup open the file and you’ll see

    if($showeditbox){

    (around line #9805).

    Add this next line one line above it:

    $showeditbox = false;

    Those two line would now look like:

    $showeditbox = false;
    if($showeditbox){

    Save the file.

    This reply was awarded the best answer by the topic poster.

    Stoly
    Stoly
    Senior Member
     
    159 points

    This worked like a charm!

    Thanks JamesD!

    :)


    Stoly
    Stoly
    Senior Member
     
    159 points

    It removed the edit listing box completely though, I just noticed now, I do need the expire text to be removed. I can Undo it, tho, is this the correct line of code?

    Thanks.


    JamesD
    JamesD
    Titan
     
    655 points

    Yes, just remove the `

    $showeditbox = false;

    Or delete the file you copied and put a copy of the backup back.


    Stoly
    Stoly
    Senior Member
     
    159 points

    Do you know how to remove the expire listing text tho?


    Stoly
    Stoly
    Senior Member
     
    159 points

    I found a way..

    I searched the expire text under language setup and then put blank space instead.

    I then put false instead of true for $expire.

    I need to know now how to align the current expiry section to sit in the middle of the page or to the left.

    Do I use margin/padding or another css rule, as when I use margin or padding it puts space between the text.

    I lastly need the edit listing boxes in it’s place.

    Attachments:
    You must be logged in to view attached files.

    JamesD
    JamesD
    Titan
     
    655 points

    Note: There are language translation settings under “Theme Setup >> Language Setup >> Text Translations”.

    Instead of messing with the multiple files, you can “comment” out the code below (same core class file, but from line #9814 through 9824 like.

    /*
    $expires = get_post_meta($post->ID, 'listing_expiry_date',true);
    if($expires != ""){
    
    	$xp = $this->TimeDiff($expires);
    	if(!$xp['expired']){
    	$STRING .= $CORE->_e(array('single','48')). $xp['date'];
    	}
    
    }else{
    $STRING .= '<h4>'.$CORE->_e(array('single','15')).' </h4>';
    }
    */
    

    Note how I started with /* and ended with */ to “comment” it out.

    These lines display the complete text portion to the left of the buttons, so by handling it this way you only remove the text and the box/buttons remain in place.


    Stoly
    Stoly
    Senior Member
     
    159 points

    Awesome, this did work.

    I still need to re-arrange items around the box/inside the border, like from my previous post using css.


    JamesD
    JamesD
    Titan
     
    655 points

    Here’s the “gist” of it…

    You would add something like below with your custom CSS.

    @media (min-width:992px){ .col-md-8 { width: inherit; }}

    Note: There may be a couple other “@media” sizes (i.e. “768px & 1200px) you’ll need to mess with too, just test. You can see what the current styling is for it at “/AT/framework/css/css.bootstrap.css”.

    I also encourage everyone that does various style modifications to become familiar with their browser inspector. It can be your best friend! j;-)


Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.