Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • I had this almost working 5 minutes ago like this:

    https://domain.com/ <<< main site (with blog)
    https://admin.domain.com/ <<< wordpress site

    The only downside: you’ll no longer be logged in on main site when you log into WordPress.

    Overview of what I did:

    1. Moved WP core files to a different directory
    2. Moved index.php to main directory (1 and 2 more or less as per here
    3. Created subdomain in Apache
    4. Restarted Apache
    5. Went to main site

    And that was it, basically! I was a little ‘cheaty’ since my admin subdomain was pointing to the main site + /admin, but that should be OK as long as you change that directory (I imagine it would work with any, even above ‘main’ path) in index.php.

    I haven’t been investigating it any further yet (and I’m thinking if I will really use it). In fact, I arrived here looking for some info.

    Apart from not seeying the ‘edit’ and other admin options in main site, everything was OK.

    To make things worse, I have found out that the original get_comments_link (as expected) is widely used not only in themes, but also in other parts of WordPress.

    For instance, all the comments feeds (global and per-entry) and even worse, in admin sections. If I use a customised function, it will break both the feeds and the admin.

    Like I said, I don’t know any PHP, but I’d be happy to investigate this if anyone can shred some light here.

    I have just realized it’s 2.5.1 you are having issues with. I got the plugin working with 2.5. So I have upgraded (BTW, I should have done before, but it’s a test system :-). Fortunately or not, looks fine to me.

    Best of the lucks again.

    I’m looking for the exact same thing without hacking the core or doing complex things.

    What I simply want to do is change #comments for #comentarios (in Spanish) to the comment links. Looks like get_comments_link is the function to change, which is in comment-template.php (in the wp-includes directory, of course). This is it:

    /**
     * get_comments_link() - Retrieves the link to the current post comments
     *
     * @since 1.5
     *
     * @return string The link to the comments
     */
    function get_comments_link() {
            return get_permalink() . '#comments';
    }

    As doodlebee points out, defining a new function would work. But, comments_popup_link makes use of comments_link, which is at the same time making use of get_comments_link again. That means, if I change the get_comments_link function to, say, get_comments_link_sp, then I also have to change comments_link to comments_link_sp, and finally, comments_popup_link to comments_popup_link_sp. Changing at least one line in each function.

    Like I say, that works, but it means copying and pasting three functions, then changing the code.

    That’s a nightmare! Seriously, hacking the core would be easier if this is the only route. At least I would save the hassle (and possible errors) of copying and pasting each time the core code changes.

    Plus, I think any other plugins or code that would use the ‘standard’ WordPress code would not work for me. Which means more hacking?

    Furthermore, there’s other functions to be changed, such as get_comment_link. Again, more pain.

    I have found out all of this without any PHP knowledge, but I feel there must be a way to make all of this much simpler.

    Any advise or help would be much appreciated.

    Cheers!

    Actually, while investigating something else, I found this comment on the source of the comments_popup_link function:

    * comments_popup_link() - Displays the link to the comments popup window for the current post ID.
    *
    * Is not meant to be displayed on single posts and pages. Should be used on the lists of posts

    So it looks like it must be used outside the single post view. And you should not need it. Maybe looking at single.php in some themes would help?

    tydende, have you tried to go to the permalinks section while administering WP and click on Save Changes? (Even if you didn’t actually change anything).

    Can’t remember if this was it or for a different plugin, but I’d give it a try.

    Good luck!

    I just registered to say you all guys rock. OSS rocks.

    I was starting a new site these days using the TLC Plugin, saw that 2.5 was out, upgraded and the error hit my face.

    fil, I can confirm it’s working fine. A big fat thanks for your support.

Viewing 7 replies - 1 through 7 (of 7 total)