Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Forum: Hacks
    In reply to: Code for searching posts?
    Thread Starter stevewilson

    (@stevewilson)

    The re-coding was done maybe four years ago. We wanted to develop a non-blog look, more like a newspaper, given the nature of the site (see: https://letsfixthiscountry.org. Maybe things have changed, but at the time an extract or the full article was the only option. I think the extract permitted a single global setting as word count, etc.

    We added a column (or two) to make four and made changes that (1) permit each article to have its own length before the “read more” break to a single page is encountered (2) columns are flexible width and most important (3) articles can be assigned to different slots in the layout (4) they can be moved at will to different slots by changing a single background code (5) if no article is assigned to it, the layout slot doesn’t appear so that the layout itself can be varied into numerous configurations.

    It’s worked without a hitch. We documented all changes so that we can reinstate after updates — which we just did, also with no problems.

    Forum: Hacks
    In reply to: Code for searching posts?
    Thread Starter stevewilson

    (@stevewilson)

    Thanks for explaining that. Clearly I needed to learn about how posts_request works before making assumptions, which I’ll do. My problem is that, while I’ve done a fair amount of probing and recoding within the supplied WordPress code in order to modify the design of our website, I’ve done next to nothing outside it, such as working directly with phpMyAdmin. Gotta give it a try.

    Thanks for your good advice.

    Forum: Hacks
    In reply to: Code for searching posts?
    Thread Starter stevewilson

    (@stevewilson)

    When a criterian is entered in the search box on the page that lists all one’s posts, the unseen code rummages through the text of every post on the site. Since everything else is freely exposed, I thought someone might know how to get hold of that code as a huge shortcut which I could then modify to output to a file a list of found images to work with.

    I could right now enter something like “img” in that search box, but WP would simply list all the posts that have an image. It sounds like “post_request” would do the same. I’d need to open each post, find each “img” in the text, and create that list manually — which would be painfully inefficient.

    I had previously put this same request in the Plugins forum but got no reply (in 24 hours), so thanks for your doing so.

    Thread Starter stevewilson

    (@stevewilson)

    Reinstalling had no appeal. The question was — with everything installed — how do we throw the switch and activate?

    Fortunately, I found the answer. While it occupies resources, those who use WordPress continuously will want Apache and MySQL to run all the time in the background, and for that one goes to Control Panel > Administrative Tools, then selects Services, and there, by right-clicking each in turn and choosing Properties, stipulate that these two be activated on machine start-up.

    Thread Starter stevewilson

    (@stevewilson)

    Thank you for the assist. However, I am not trying to reverse the order, I’m hoping to cause the comments to display in order. In Settings>Discussion it is set for “newer” comments to the top of page, but here’s what I’m looking at in the problem instance:

    Comment June 5
    Reply June 5
    Comment June 4
    Reply June 5
    Comment June 4
    Reply June 4
    Comment June 6

    Note the last one.

    Thread Starter stevewilson

    (@stevewilson)

    Valuable answers. Thanks to you both.
    Steve

    Thread Starter stevewilson

    (@stevewilson)

    Thanks, Esmi

    Thread Starter stevewilson

    (@stevewilson)

    Shazdeh:

    Like you suggest, I declared the global as the first line of functions.php before any functions are defined. I then call function set_caller() to set $a’s value, just as you show (on entering the Home page).

    If the reader then clicks on a post to “read more”, single.php calls get_caller() to find out if the reader came from the home page. But $a is empty.

    I added $a = “test” right under global $a, just as you did. That was revealing, because now when I call get_caller() it says the value is “test”. In other words, every time a function in functions.php is called, the global declared at the top is getting reset, destroying the value I had hoped to store.

    I think I’m going to have to create table in the database to freeze this property. Thanks for responding.

    Steve

    Thread Starter stevewilson

    (@stevewilson)

    Thanks much ! Terrific help.

    Thread Starter stevewilson

    (@stevewilson)

    Thanks, Esmi. I had tried the Codex but a search on “convert” didn’t bring up “Giving…”

    Thread Starter stevewilson

    (@stevewilson)

    esmi –

    I found it. The sort of near invisible thing one might never spot. On its path from Microsoft Word through some editing software and into WordPress’ post box, the post somehow acquired around the link those inward and outward slanting double-quotes (therefore different ASCII) rather than straight up and down quotes.

    Whew. Thought we were doomed.

    Thanks for hanging in there with us. Not a bad item to add to the troubleshooting bible.

    Steve

    Thread Starter stevewilson

    (@stevewilson)

    The issue is specific to the middle column where the links are malformed – eg: https://letsfixthiscountry.org/www.rollingstone.com/politics/news/the-people-vs-goldman-sachs-20110511

    The link becomes malformed when clicked. It’s not malformed to begin with. The following is a cut-n-paste from Firefox’s source window showing that the link is in good shape:

    <em>Bloomberg/Business Week</em>  in an
    <a href=”https://www.businessweek.com/magazine/content/11_21/b4229060222515.htm“ target="_blank">article

    Baffling.

    Thread Starter stevewilson

    (@stevewilson)

    Continuing:

    1) in addition to upgrading to 3.1.3, I uploaded from the local machine to the webhost the wp-admin and wp-includes folders.

    2) I followed the FTP procedure for setting the plugins folder aside, substituted an empty folder (the admin panel reported “You don’t seem to have any plugins, so I guess I got that right), then reinstated the original plugins folder.

    The problem with link addresses still persists. Major trouble.

    Where does one turn next?

    Thread Starter stevewilson

    (@stevewilson)

    esmi –

    Thanks so much for dealing with this. I:
    – Deactivated all plugins
    – Switched to TwentyTen
    – Downloaded (at the webhost) 3.1.3, replacing 3.1.2, which I assume satisfies your last suggestion.
    The problem is still there. I’ll next try “resetting the plugins folder”, which will take a bit of time while I learn what that’s about.

    In the meantime, it might make the problem clearer if you were to go to https://letsfixthiscountry.org (I restored theme after testing 20-10) and click any one of the links (different color text) in the middle column. Assuming you get 404, you will see in the browser’s address line that it didn’t clear the site’s URL and appending the link to it.

    Thanks again for help. This is panic inducing.

    Steve

    Thread Starter stevewilson

    (@stevewilson)

    You wouldn’t happen to have a URL for such a forum would you? For Google, Bing, whatever? I went looking and kept falling into SEO sites and others pretending to be Google. Just a standard help-each-other forum or two like this one?

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