jdavidstark
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Redirecting URL with SpacesThanks. The 2 hits recorded have come from when I’ve temporarily tested whether Open-Online-Library.htm (with dashes, not spaces) will redirect successfully, and it does.
When I swap back in either spaces or %20, however, I’m not able to get the redirect to work, even after clearing browser caches, trying different browsers, etc.
Would you have any other suggestions about what to try next?
Thanks again!
Forum: Plugins
In reply to: [Redirection] Redirecting URL with SpacesDo you need to use a regular expression?
No, not now that I see, from your comment above, that I can simply ignore added parameters. Here’s an updated redirect without the RegEx, but still no dice on it actually getting redirected.
{
"id": 262,
"url": "/wp-content/uploads/file-store/Open Online Library.htm",
"match_url": "/wp-content/uploads/file-store/open%20online%20library.htm",
"match_data": {
"source": {
"flag_query": "pass",
"flag_case": true,
"flag_trailing": true,
"flag_regex": false
}
},
"action_code": 301,
"action_type": "url",
"action_data": {
"url": "https://www.jdavidstark.com/wp-content/uploads/2024/01/Open Online Library.htm"
},
"match_type": "url",
"title": "",
"hits": 2,
"regex": false,
"group_id": 9,
"position": 3,
"last_access": "13 February 2024",
"enabled": true
}If, however, I make
"url": "/wp-content/uploads/file-store/Open Online Library.htm"
to be
"url": "/wp-content/uploads/file-store/Open-Online-Library.htm"
then the redirect does happen if I go to Open-Online-Library.htm. Unfortunately, it’s the URL with the spaces (not the hyphens) that I’m trying to redirect.
Would any of this prompt any other ideas about possible options?
Thanks, again!
Forum: Plugins
In reply to: [Redirection] Redirecting URL with SpacesI’ve tried several different ones, but here’s one version:
"url": "^\/wp-content\/uploads\/file-store\/Open.Online.Library.*",
"match_url": "regex",
"match_data": {
"source": {
"flag_query": "exact",
"flag_case": true,
"flag_trailing": true,
"flag_regex": true
}
},
"action_code": 301,
"action_type": "url",
"action_data": {
"url": "https://www.jdavidstark.com/wp-content/uploads/2024/01/Open-Online-Library.htm"
},
"match_type": "url",
"title": "",
"hits": 1,
"regex": true,
"group_id": 9,
"position": 3,
"last_access": "29 January 2024",
"enabled": true- This reply was modified 9 months, 3 weeks ago by jdavidstark.
Forum: Plugins
In reply to: [Redirection] Redirecting URL with SpacesThanks so much for your response!
The first is you are trying to redirect a file, and your server may be configured to prevent this
My apologies that I neglected to mention file redirection explicitly. All other file URLs redirect just fine, and if I try to redirect …/Open-Online-Library.htm, that redirects fine as well. But if I try to redirect …/Open Online Library.htm or …/Open%20Online%20Library.htm, the redirect seemingly doesn’t “take.”
Would you have any further insights or suggestions about next steps?
Forum: Plugins
In reply to: [Zotpress] RDF LinksOn closer inspection, it does look like
1) [the Zotero API supports exports in RDF](https://www.zotero.org/support/dev/web_api/v3/basics) and
2) the pertinent changes mainly (solely?) involve Zotpress’s request.cite.php file, assuming that I only wanted to get RDF output and never RIS.But when I attempt to replace the RIS elements there with the pertinent entries for
rdf_zotero
, I get back a file with the contents [null]. Here’s what I’ve tried from lines 40–55 of the request.cite.php:$zp_import_url = “https://api.zotero.org/”.$zp_account[0]->account_type.”/”.$zp_api_user_id.”/items/”.$zp_item_key.”?format=rdf_zotero&key=”.$zp_account[0]->public_key;
// Read the external data
$zp_xml = $zp_import_contents->get_request_contents( $zp_import_url, true, ‘rdf‘ ); // Here, I’ve also tried instead rdf_zotero.if ( $zp_xml !== false
&& strlen(trim($zp_xml[“json”])) > 0 )
{
header(‘Content-Type: application/x-research-info-systems’);
header(‘Content-Disposition: attachment; filename=”itemkey-‘.$zp_item_key.’.rdf“‘);
header(‘Content-Description: Cite with RDF‘);
echo $zp_xml[“json”];
}
else
{
echo “No RDF file found.”;Would you have any insight into what I might be missing here or elsewhere?
- This reply was modified 2 years, 6 months ago by jdavidstark.
Forum: Plugins
In reply to: [Options for Twenty Twenty-One] Headline PlacementAs a related issue, it would be helpful to have the mobile menu close button appear in the same place as the hamburger button. I think I’ve got the vertical (up-down) placement ironed out. But at screen widths of 822px or greater, I’m having trouble sorting out how to change the horizontal (left-right) placement.
Would you have any thoughts about that adjustment too?
Forum: Plugins
In reply to: [Options for Twenty Twenty-One] Headline PlacementAh, my apologies. What I was meaning was that the headline and the menu button don’t line up on the same horizontal line across the screen, which would indeed be a vertical spacing issue. ??
This latest snippet does move in the right direction and appears to resolve the issue on the front end. However, when logged into the dashboard, the admin menu seems to displace the menu button (see here).
That’s not a huge deal, but it would be helpful to see the same thing when logged in as displays to folks on the front end.
Would there be a good way to fix that?
Forum: Plugins
In reply to: [Options for Twenty Twenty-One] Headline PlacementIt doesn’t seem to. It looks like that CSS adjusts the horizontal position of the menu button container, not its vertical position relative to the site header. Here’s an updated preview of what happens when that media query is inserted.
Thanks so much for your help!
Forum: Plugins
In reply to: [Options for Twenty Twenty-One] Headline PlacementSure. You can view with the mobile menu on at this link.
Thanks so much for your help!
Forum: Plugins
In reply to: [Header Footer Code Manager] Redirect Script in Head Not Processing FirstThanks for the tip. But I have HFCM only loading one script per page at most, so it seems that there’s nothing to rename.
It looks like the issue may be that the the HFCM snippet currently comes inside the <head> tag after instructions to load the theme’s CSS file etc. See, e.g., the reference to “growthtools” near the end of line 17 of the sample page above (
view-source:https://www.jdavidstark.com/subscribe/welcome-post-logos-partner-pack-download/
), which is what’s added via HFCM and appears after various instructions to start loading material like this were a “standard” page.Forum: Plugins
In reply to: [Header Footer Code Manager] Redirect Script in Head Not Processing FirstSorry it’s taken me some time to run a proper test. But I’ve been able to confirm that moving the script to the first position under <head> does fix the flashing issue.
So, if placing a script first in the page header could be an option in HFCM, that would be most helpful.
Thank you so much!
Forum: Plugins
In reply to: [Header Footer Code Manager] Script at HeadI have a script installed on this page and set to run in the header.
But when the page loads, the browser momentarily flashes one version of the page before pulling in the replacement (e.g., Edge, Firefox).
Is the ability to move a script higher in the header (e.g., to the top) what would allow the script to run without flashing the one version of the page first?
Thank you so much for your thoughts.
Forum: Plugins
In reply to: [Head, Footer and Post Injections] Disable Injection On Specific PageThanks so much for looking at it.
Forum: Plugins
In reply to: [Head, Footer and Post Injections] Disable Injection On Specific PageThanks so much! I do see the options in Gutenberg to disable either the top or bottom injections. But when I
1) check the option to disable, e.g., the bottom injection on a page that has it,
2) update the page, and
3) view the page, the update hasn’t taken effect. This is true even when I clear the cache, open in an InPrivate window, etc. More particularly also,
4) when I edit the same page again, the option that I checked to disable the bottom injection has come unchecked.Is there something else that I should be doing to make the disabling of a given injection save?
Forum: Plugins
In reply to: [Head, Footer and Post Injections] Disable Injection On Specific PageJust to confirm, I’m still not seeing the option to disable injections on a specific page in Gutenberg. (I’d forgotten I’d posted on the issue earlier above. :-))
Is a fix still in progress?
Thanks so much for the update!