bolide
Forum Replies Created
-
Try using the techniques here:
https://www.brunildo.org/test/img_center.htmlI think the relevant CSS should be used inside the div class=”ngg-widget-slideshow”
Nick Froome
Forum: Plugins
In reply to: [The Events Calendar] [Plugin: The Events Calendar] individual event marginsPost a link to a sample page and I’ll see if I can locate the relevant CSS
See this thread:
Nick Froome
Forum: Plugins
In reply to: [The Events Calendar] [Plugin: The Events Calendar] individual event marginsI believe the PHP should be in plug-ins / the-events-manager / views / single.php and the css in plug-ins / the-events-manager / resources / events.css
Nick Froome
Excellent. You could be a smartarse and use a PHP strtotime expression to render the current year. That way you wouldn’t need to modify the code each year if you want the copyright year to change
Nick Froome
Forum: Plugins
In reply to: [Plugin: The Events Calendar] remove the word category from URLIt’s done using REGEX in the .htaccess file. You’ll find there’s probably a redirect in there already, courtesy of WordPress, to point yourdomain.com to https://www.yourdomain.com
Google .htaccess and you will find instructions. REGEX is complicated so find an example that is closest to what you want and modify it
Nick Froome
“But do you know why nRelated links do not work in this plugin?”
I suspect that the change from a Post to a Custom Post type (2.x onwards) is the cause of this
Nick Froome
So it looks like “esc_html” will do the trick. Didn’t know that WordPress had things like that!
Nick Froome
From: https://php.net/manual/en/function.echo.php
echo “Escaping characters is done \”Like this\”.”;
You need to “escape” special characters in PHP so ” becomes \”. Obviously you want to write to the database correctly (without escape characters) so you need to persuade PHP to output the string including the special characters rather than printing them unescaped in the HTML – and missing out the bits in quotes
Right now PHP is rendering echo “My picture “summer””; correctly as “My picture”. You need it to render it as echo “My picture \”summer\””;
You’ll need to find a PHP function to correctly escape special characters when read from the database. HEREDOC may work but it’s a bit beyond me
Nick Froome
Wrap the image in code like this:
<a class="thickbox" href="yourimage.jpg">yourimageteaser.jpg</a>
Replace thickbox with whatever lightbox style you are using
Nick Froome
“I want the same branding on all images to show up in the center of the image where the alt text shows and on mouseover”
Look in the PHP for the view you use, find the echo command that displays the alt text and replace it with echo “Your branding text here”
Nick Froome
Forum: Plugins
In reply to: [Plugin: The Events Calendar] remove the word category from URLYou can do it with one line of code in your .htaccess file if you don’t want to use a plugin
Nick Froome
You’ll need a bit of PHP date calculation to get this to work. Google it – it’s more complex than it seems. I did this ten years ago using Filemaker and it was easy. It’s basically
“The event starts in (Today-tribe_get_start_date) days”
If you want to be clever then do this
If(Today-tribe_get_start_date) >1 “The event starts in (Today-tribe_get_start_date) days”
else if (Today-tribe_get_start_date) = 1 “The event starts tomorrow”
else if (Today-tribe_get_start_date) = 0 “The event starts today”
else if (Today-tribe_get_end_date) >1 “The event is on today”
else if (Today-tribe_get_end_date) = 0 “the event ends today”
else if (Today-tribe_get_end_date) <0 “The event has finished”In Filemaker I simplified the calculations by using the ISO day number (ie the number of the day in the year) but I think if you do that you’ll need to throw in a year check as well so that events don’t show up a year later
Once you figure out the basic calculation all you need then are the else if steps to calculate the result
This is really useful link:
https://www.the-art-of-web.com/php/strtotime/Nick Froome
You can use the Redirection plugin to rewrite a URL dependent on whether someone is logged in or not. You should be able to redirect people who are not logged in to a separate page
https://www.ads-software.com/extend/plugins/redirection/
Nick Froome
Forum: Themes and Templates
In reply to: Permalink troubleYou can use the Redirection plugin to rewrite one URL with another. It’s easy to setup
https://www.ads-software.com/extend/plugins/redirection/
Nick Froome