Title: Daniel's Replies | WordPress.org

---

# beda69

  [  ](https://wordpress.org/support/users/beda69/)

 *   [Profile](https://wordpress.org/support/users/beda69/)
 *   [Topics Started](https://wordpress.org/support/users/beda69/topics/)
 *   [Replies Created](https://wordpress.org/support/users/beda69/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/beda69/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/beda69/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/beda69/engagements/)
 *   [Favorites](https://wordpress.org/support/users/beda69/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 74 total)

1 [2](https://wordpress.org/support/users/beda69/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/beda69/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/beda69/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/beda69/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/beda69/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Toolset Types - Custom Post Types, Custom Fields and Taxonomies] Do you plan to update included copy of jQuery Select2.](https://wordpress.org/support/topic/do-you-plan-to-update-included-copy-of-jquery-select2/)
 *  [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/do-you-plan-to-update-included-copy-of-jquery-select2/#post-7302849)
 * Yes, I apologize, this is not yet deployed.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Editing old post](https://wordpress.org/support/topic/support-forum-4/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/support-forum-4/#post-7006951)
 * So well reading that guideline you probably wont delete my links 🙁
 * It’s about this 2 posts:
    [https://wordpress.org/support/topic/custom-home-page-5](https://wordpress.org/support/topic/custom-home-page-5)
   [https://wordpress.org/support/topic/my-sites-access-after-signup](https://wordpress.org/support/topic/my-sites-access-after-signup)
 * All I would like to edit is the “my-homepage.com” (i wont be so stupid and post
   them again here)
 * I would like to edit all links to my website to a “random” dummy URL
 * Is it possible?
 * It would be very great. Thank you
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Correctly Increase Version Number](https://wordpress.org/support/topic/correctly-increase-version-number/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/correctly-increase-version-number/#post-5847249)
 * we need more info.
    can you elaborate?
 * Is it a official theme, then no changes on your end should ever be made in the
   Themes files
 * Is it your own built theme?
 * Is it a free theme? if so, link to it?
 * thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CoursePress Learning Management System] DB Error](https://wordpress.org/support/topic/db-error-15/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/db-error-15/#post-6277492)
 * also, once you answer, might you elaborate:
 * 1. How do you store your data? Your courses, as example, seem to be Post Types
   but at same time, they seem not to be.
 * I ask because I need to interact with the data of this plugin, but I can only
   if those are stored as classic post types.
 * 2. How do you store the relation Course-Module-Scholar-Teacher etc? custom fields?
   post meta?
 * Thanks
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [consultation](https://wordpress.org/support/topic/consultation/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/consultation/#post-6147344)
 * thanks for follow up.
 * I solved the issues and non-features-
 * 1. Email notification solved with custom function that triggers wp_mail if [@username](https://wordpress.org/support/users/username/)
   is found in post/comment (and a bunch of other stuff)
 * 2. No drop Down in Post body, if post is not default page or post
    I should have
   specified that. Solved by adding a pointer to the correct JS.
 * BTW. re-downloading and overwriting the P” default jquery. autocomplete.js solved
   another issue:
    users where not “toogeable” in popping up list of users when 
   [@username](https://wordpress.org/support/users/username/) is typed.
 * If P2’s files are overwritten this works fine.
 * All issues solved.
 * (Apart from a bunch of errors that P2 throws on activation with wp-debug=true)
   
   But that seems soled in P3.
 * Thanks!
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [@mentions – use for child / new theme](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/#post-6143678)
 * OK, here comes a partial “solution” to this
 * I am working with bootstrap therefore some things might change from theme to 
   theme…
 * Include in your current themes functions.php at the very top this one:
 *     ```
       require_once( get_template_directory() . '/inc/utils.php' );
   
       p2_maybe_define( 'P2_INC_PATH', get_template_directory()     . '/inc' );
       p2_maybe_define( 'P2_INC_URL',  get_template_directory_uri() . '/inc' );
       p2_maybe_define( 'P2_JS_PATH',  get_template_directory()     . '/js'  );
       p2_maybe_define( 'P2_JS_URL',   get_template_directory_uri() . '/js'  );
   
       class P2 {
           /**
       	 * DB version.
       	 *
       	 * @var int
       	 */
           var $db_version = 3;
   
           /**
       	 * Options.
       	 *
       	 * @var array
       	 */
           var $options = array();
   
           /**
       	 * Option name in DB.
       	 *
       	 * @var string
       	 */
           var $option_name = 'p2_manager';
   
           /**
       	 * Components.
       	 *
       	 * @var array
       	 */
           var $components = array();
   
           /**
       	 * Includes and instantiates the various P2 components.
       	 */
           function P2() {
               // Fetch options
               $this->options = get_option( $this->option_name );
               if ( false === $this->options )
                   $this->options = array();
   
               // Include the P2 components
               $includes = array( 'compat', 'terms-in-comments', 'js-locale',
                                 'mentions', 'search', 'js', 'options-page', 'widgets/recent-tags', 'widgets/recent-comments',
                                 'list-creator' );
   
               require_once( P2_INC_PATH . "/template-tags.php" );
   
               // Logged-out/unprivileged users use the add_feed() + ::ajax_read() API rather than the /admin-ajax.php API
               // current_user_can( 'read' ) should be equivalent to is_user_member_of_blog()
               if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ( p2_user_can_post() || current_user_can( 'read' ) ) )
                   $includes[] = 'ajax';
   
               foreach ( $includes as $name ) {
                   require_once( P2_INC_PATH . "/$name.php" );
               }
   
               // Add the default P2 components
               $this->add( 'mentions',             'P2_Mentions'             );
               $this->add( 'search',               'P2_Search'               );
               $this->add( 'post-list-creator',    'P2_Post_List_Creator'    );
               $this->add( 'comment-list-creator', 'P2_Comment_List_Creator' );
   
               // Bind actions
               add_action( 'init',       array( &$this, 'init'             ) );
               add_action( 'admin_init', array( &$this, 'maybe_upgrade_db' ), 5 );
           }
   
           function init() {
   
           }
   
           function ajax_read() {
               if ( ! defined( 'DOING_AJAX' ) ) {
                   define( 'DOING_AJAX', true );
               }
   
               require_once( P2_INC_PATH . '/ajax-read.php' );
   
               P2Ajax_Read::dispatch();
           }
   
           /**
       	 * Will upgrade the database if necessary.
       	 *
       	 * When upgrading, triggers actions:
       	 *    'p2_upgrade_db_version'
       	 *    'p2_upgrade_db_version_$number'
       	 *
       	 * Flushes rewrite rules automatically on upgrade.
       	 */
           function maybe_upgrade_db() {
               if ( ! isset( $this->options['db_version'] ) || $this->options['db_version'] < $this->db_version ) {
                   $current_db_version = isset( $this->options['db_version'] ) ? $this->options['db_version'] : 0;
   
                   do_action( 'p2_upgrade_db_version', $current_db_version );
                   for ( ; $current_db_version <= $this->db_version; $current_db_version++ ) {
                       do_action( "p2_upgrade_db_version_$current_db_version" );
                   }
   
                   // Flush rewrite rules once, so callbacks don't have to.
                   flush_rewrite_rules();
   
                   $this->set_option( 'db_version', $this->db_version );
                   $this->save_options();
               }
           }
   
           /**
       	 * COMPONENTS API
       	 */
           function add( $component, $class ) {
               $class = apply_filters( "p2_add_component_$component", $class );
               if ( class_exists( $class ) )
                   $this->components[ $component ] = new $class();
           }
           function get( $component ) {
               return $this->components[ $component ];
           }
           function remove( $component ) {
               unset( $this->components[ $component ] );
           }
   
           /**
       	 * OPTIONS API
       	 */
           function get_option( $key ) {
               return isset( $this->options[ $key ] ) ? $this->options[ $key ] : null;
           }
           function set_option( $key, $value ) {
               return $this->options[ $key ] = $value;
           }
           function save_options() {
               update_option( $this->option_name, $this->options );
           }
       }
   
       $GLOBALS['p2'] = new P2;
   
       function p2_get( $component = '' ) {
           global $p2;
           return empty( $component ) ? $p2 : $p2->get( $component );
       }
       function p2_get_option( $key ) {
           return $GLOBALS['p2']->get_option( $key );
       }
       function p2_set_option( $key, $value ) {
           return $GLOBALS['p2']->set_option( $key, $value );
       }
       function p2_save_options() {
           return $GLOBALS['p2']->save_options();
       }
       ```
   
 * then include the JS and INC folders in your Theme
 * Remove from js/jquery.jeditable.js this one (otherwise your Bootstrap “Submit
   Comment” button breaks) :
 *     ```
       defaults: {
                       element : function(settings, original) {
                           var input = $('<input type="hidden"></input>');
                           $(this).append(input);
                           return(input);
                       },
                       content : function(string, settings, original) {
                           $(':input:first', this).val(string);
                       },
                       reset : function(settings, original) {
                         original.reset(this);
                       },
                       buttons : function(settings, original) {
                           var form = this;
                           if (settings.submit) {
                               /* if given html string use that */
                               if (settings.submit.match(/>$/)) {
                                   var submit = $(settings.submit).click(function() {
                                       if (submit.attr("type") != "submit") {
                                           form.submit();
                                       }
                                   });
                               /* otherwise use button with given string as text */
                               } else {
                                   var submit = $('<button type="submit" />');
                                   submit.html(settings.submit);
                               }
                               $(this).append(submit);
                           }
                           if (settings.cancel) {
                               /* if given html string use that */
                               if (settings.cancel.match(/>$/)) {
                                   var cancel = $(settings.cancel);
                               /* otherwise use button with given string as text */
                               } else {
                                   var cancel = $('<button type="cancel" />');
                                   cancel.html(settings.cancel);
                               }
                               $(this).append(cancel);
   
                               $(cancel).click(function(event) {
                                   //original.reset();
                                   if ($.isFunction($.editable.types[settings.type].reset)) {
                                       var reset = $.editable.types[settings.type].reset;
                                   } else {
                                       var reset = $.editable.types['defaults'].reset;
                                   }
                                   reset.apply(form, [settings, original]);
                                   return false;
                               });
                           }
                       }
                   },
       ```
   
 * This works with a few glitches, which i’ll post next… just give me some time 
   🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [@mentions – use for child / new theme](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/#post-6143666)
 * OK; i thank you
 * very nice your help.
 * solved, will eventually present this in a tutorial once done
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [@mentions – use for child / new theme](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/#post-6143572)
 * thanks
 * I tried a “find by exclude” process, and as far aI see all JS folder files are
   quiet necessary + ca. 1/2 of the inc folder too.
 * I was able to reduce your theme down to the essential functions mention by you
   above, but still it requires many js files to “work”
 * will get there.
 * A final one:
 * I see it is not supported to “tag” users in POST BODY, even though you include“
   the_content” in the filter hook.
 * Any reasons why only comments have the fancy “pop up” when start typing?
 * AND
 * Whats about email notifications on tagging?
 * I am on MAMP therefore bit difficult to check if it gives me notifications on
   tag event.
 * Perhaps you can enlighten me?
 * then I will happily close this one and go ahead 😀
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [@mentions – use for child / new theme](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/mentions-use-for-child-new-theme/#post-6143561)
 * thanks
 * I saw that, but this is not what I need i guess.
 * I see the “mentions” file is included in this, would it mean, I need to integrate
   ALL those files:
    ( ‘compat’, ‘terms-in-comments’, ‘js-locale’, ‘mentions’, ‘
   search’, ‘js’, ‘options-page’, ‘widgets/recent-tags’, ‘widgets/recent-comments’,‘
   list-creator’ ) or could I work just with the Mentions file?
 * I will try… 😀
 * thanks for this (and more) info 😀
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Code tags do not properly work](https://wordpress.org/support/topic/code-tags-do-not-properly-work/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/code-tags-do-not-properly-work/#post-6107440)
 * Why is it working in this very forum?
 * Does wordpress.org use a special plugin or custom code to render the code properly?
 * It makes poor sense that the very support forum accepts my code above, but the
   default (user end) WP “Text” Editor cuts of code, makes <img src> tags to links
   and $code to /code>
 * This is odd.
 * Any suggestion from the devs of this very support forum is very welcome
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Code tags do not properly work](https://wordpress.org/support/topic/code-tags-do-not-properly-work/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/code-tags-do-not-properly-work/#post-6107331)
 * also pre formatting with <pre and </pre tags, does not really make it nicer
 *   Forum: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
   
   In reply to: [Image Path not working if not hardcoded](https://wordpress.org/support/topic/image-path-not-working-if-not-hardcoded/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/image-path-not-working-if-not-hardcoded/#post-6046789)
 * The only way I get this to work (I tested online to be sure)
 *     ```
       <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
                                           <img alt="Brand" src="<?php bloginfo('template_directory'); ?>/images/icon.png" style="max-width: 30px;">
                                       </a>
       ```
   
 * OR
 *     ```
       <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
                                           <img alt="Brand" src="http://mysite.com/wp-content/themes/mytheme/images/icon.png" style="max-width: 30px;">
                                       </a>
       ```
   
 * OR
 *     ```
       <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>">
                                           <img alt="Brand" src="./wp-content/themes/mytheme/images/icon.png" style="max-width: 30px;">
                                       </a>
       ```
   
 * According to all DOC i read, [](https://wordpress.org/support/users/beda69/replies/?output_format=md)
   [_this_](http://stackoverflow.com/questions/4810927/how-to-go-a-level-up-in-src-path-in-html)
   should also work, but it does not
 * Not sure if this works only in CSS field though
 *   Forum: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
   
   In reply to: [Image Path not working if not hardcoded](https://wordpress.org/support/topic/image-path-not-working-if-not-hardcoded/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/image-path-not-working-if-not-hardcoded/#post-6046782)
 * does not seem to be so.
 * I checked 80% of theme 2014’s files and the only I found was:
    `<img src="<?php
   header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="
   <?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo('
   name', 'display' ) ); ?>">`
 * I use this:
 * `<img alt="Brand" src="./images/icon.png" style="max-width: 30px;">`
 * and if I use Brackets to code, and hover over that piece of code, correctly the
   image displays on hover
 * However, if I load the page in Firefox, image is broken and the console tells
   me “Could not load image” and the ONLY that works in console is if I change the
 * `src="./images/icon.png"`
 * part to:
 * `<img alt="Brand" src="http://localhost:8888/mysite/wp-content/themes/mytheme/
   images/icon.png" style="max-width: 30px;">`
 * and this is for sure not the way it should be achieved.
 * To you recommend to create a variable and then get it with a call to?
 * like
 * `$imagepath = get_template_directory() . '/images/';`
 * and then echo it?
 * I am not sure this is the good approach!
 * thank you
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [save options sections one by one](https://wordpress.org/support/topic/save-options-sections-one-by-one/)
 *  Thread Starter [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/save-options-sections-one-by-one/#post-5855317)
 * hello
 * thanks for te reply
 * i see it can’t be done with simple php
 * will look into that AJAX and post my findings here….
 * tnx
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [I see my page but nobody else is seeing it ?](https://wordpress.org/support/topic/i-see-my-page-but-nobody-else-is-seeing-it/)
 *  [beda69](https://wordpress.org/support/users/beda69/)
 * (@beda69)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/i-see-my-page-but-nobody-else-is-seeing-it/#post-5855104)
 * no prob 🙂
 * here a a few links to start with:
 * [http://tune.pk/video/3669840/how-to-fix-dns-probe-finished-nxdomain-non-existent-domain-dns-lookup-failed-chrome](http://tune.pk/video/3669840/how-to-fix-dns-probe-finished-nxdomain-non-existent-domain-dns-lookup-failed-chrome)
 * [http://superuser.com/questions/751965/unable-to-access-most-internet-sites-error-dns-probe-finished-nxdomain](http://superuser.com/questions/751965/unable-to-access-most-internet-sites-error-dns-probe-finished-nxdomain)
 * [http://www.fixerrs.com/2015/01/Dns-Probe-Finished-NxDomain.html](http://www.fixerrs.com/2015/01/Dns-Probe-Finished-NxDomain.html)

Viewing 15 replies - 1 through 15 (of 74 total)

1 [2](https://wordpress.org/support/users/beda69/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/beda69/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/beda69/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/beda69/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/beda69/replies/page/2/?output_format=md)