Jump to content

potski

New Members
  • Posts

    8
  • Joined

  • Last visited

potski's Achievements

Member

Member (2/5)

0

Reputation

  1. Duly noted. Thanks for speaking your mind about it. I will try to look up its javascript and modify it from there. And yes it is a widget from a Wordpress theme that is discontinued (no support for it anymore so trying to figure it out whilst learning).
  2. Maybe this is what needs to be adjusted: Instead of selecting "Cities to show" then making it "Cities to hide" would do the trick?
  3. Attached the full PHP file. Should have done that earlier. Changing $terms = get_terms("ad_city","parent=0&hide_empty=0"); to $terms = get_terms("ad_city","ad_city=0&hide_empty=0"); will change the options from only parents to both categories and subcategories but still same problem -> subcategories can't be hidden if its parent is ticked. widget6.php
  4. Hmm okay well that clears something up lol. How about this: if(count($terms) < count($terms_k)) $disp_btn = 1; else $disp_btn = 0; $count = count($terms); $i = 0; if ( $count > 0 ){ echo "<ul id='location-stuff'>"; foreach ( $terms as $term ) { if($i%$nr == 0) echo "<li>"; $total_ads = 0; $terms2 = ''; $terms2 = get_terms("city","parent=".$term->term_id."&hide_empty=0"); $mese2 = ''; if($terms2 && $only_parents == false) { foreach ( $terms2 as $term2 ) { I tried playing with this line: if($terms2 && $only_parents == false). Like this, then all categories and subcategories show up. I tried replacing only_parents it to only_these but it didn't have much of an impact. I guess it needs a second command?
  5. Greetings, So I am working on making a widget, I have the option to hide categories from it. The list with options of what to hide consist of both categories and subcategories. Now, the problem is, if I tick a main category then all subcategories will automatically be shown also. Meaning nothing will be hidden. If I only tick subcategories without its parent, well then everything will be shown on the page as long as its parent is ticked. Any ideas on how I can enable hiding subcategories while showing its parent? <p> <label for="<?php echo $this->get_field_id('nr_rows'); ?>"><?php _e('Only show cities below'); ?>:</label> <?php echo '<input type="checkbox" name="'.$this->get_field_name('only_these').'" value="1" '.( $instance['only_these'] == "1" ? ' checked="checked" ' : "" ).' /> '; ?> </p> <p> <label for="<?php echo $this->get_field_id('nr_rows'); ?>"><?php _e('Cities to show'); ?>:</label> <div style=" width:220px; height:180px; background-color:#ffffff; overflow:auto;border:1px solid #ccc"> <?php $terms = get_terms("ad_city","ad_city=0&hide_empty=0"); foreach ( $terms as $term ) { echo '<input type="checkbox" name="'.$this->get_field_name('term_'.$term->term_id).'" value="'.$term->term_id.'" '.( $instance['term_'.$term->term_id] == $term->term_id ? ' checked="checked" ' : "" ).' /> '; echo $term->name.'<br/>'; Any help would be much appreciated :-)
  6. Any further ideas? I have been trying to find a PHP Wordpress compatible script that works better than the one in OP but no luck so far
  7. Thanks for the reply and for looking into it! Well, it is from a WordPress theme that unfortunately is discontinued meaning no support so trying to figure this out is tricky to say the least. It is functional though, no bugs it just needs some modifications. Since it works and its layout is acceptable, I'm wondering if there are any chance of any free messaging scripts out there that I can add to it and be done with it that way? I am no expert in coding I have to admit.
  8. Greetings guys, I hope someone can help me out, I will try to keep it short. Currently, the private messaging page on my site appears as: From, subject, date and then read/delete. I would like to change this to: From, date and preview of message (showing a few words of the latest message). Instead of having a 'Read' button, it can be opened by clicking on the preview message. Also, another thing I am trying to do is to make the messages appear like conversations instead of email-like layout. Currently, even if I have several messages from the same user, each message will have its own thread. So instead of having multiple threads from the same user, I am trying to add all messages from the same user into one thread. Opening the thread will show all messages from the user and your replies. Anyone know how this is possible? Please take a look at the PHP I currently have and let me know what's up Thanks in advance! Any help is greatly appreciated. private_messaging.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.