Pawel
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Subscribe2] Settings copying from one site to another on multisiteI think this topic is related to my problem.
I have installed the dev version of the plugin (and translated it to Polish on the way) and it works for now. But I guess that the standard version still contains this bug.
I’ve done it already ?? I’ve disabled all network-wide plugins and all site-specific plugins and tried to validate the feed again. I’ve still got a blank line there.
But I think that this xml file is generated automatically and I cannot get to it straightaway. Am I wrong?
In general, it is suggested to look into files like plugins, wp-config.php or functions.php. But if you could tell me the path of the file then I will see if I can make it work ??
Forum: Fixing WordPress
In reply to: Permalinks breaking my theme (or other way round)Ah, it was that simple…
I have been storing theme’s stylesheets in the root (apart from an empty style.css in theme’s directory) as I was creating two identical themes – one translated into Polish, other into English. It seemed easier to have just a single set of stylesheets.
Anyway, thanks a lot! Working perfectly now ??
Forum: Hacks
In reply to: Modify "Press This" body templateOk ??
By the way, do you have any particular plugin in mind? I couldn’t find any.
Forum: Hacks
In reply to: Modify "Press This" body templateOh, ok. My bad. Can you edit/remove my post? I don’t want to mislead anyone (now that I see what I’ve done).
Sorry!
Forum: Hacks
In reply to: Modify "Press This" body templateTo be honest, I forgot about this topic ?? I haven’t figured it out but when I saw your post, I decided to give it a try on my own.
Turns out, the file that is handling Press This behaviour is located at wp-admin/press-this.php. It’s quite a long file but editing it is relatively straightforward.
Before you edit it, DUPLICATE IT. You don’t want to be downloading whole new WordPress package for a single 26KB file should anything go wrong.
First, head to lines 102-105:
if ( ! empty($selection) ) { $selection = preg_replace('/(\r?\n|\r)/', '</p><p>', $selection); $selection = 'ThisWillAppearBeforeSelectedText' . str_replace('<p></p>', '', $selection) . 'ThisWillAppearAfterSelectedText'; }
Here you can replace what is being placed before and after the “quoted” text (if you select some text on a site and click the Press This bookmarklet, WordPress will automatically paste it into the editor for you). Simply edit ThisWillAppearBeforeSelectedText and ThisWillAppearAfterSelectedText (‘apostrophes’ must stay as they are).
If you want to make it Markdown-style, replace the first string with ‘> ‘ and make the second string empty.Now, to style the rest, head to lines 601-612:
$content = 'ThisWillApearBeforeAnythingElse'; if ( $selection ) $content .= $selection; if ( $url ) { $content .= 'ThisWillAppearBeforeTheLink'; if ( $selection ) $content .= __('ThisIsTheVIAString'); $content .= sprintf( "[%s](%s)", esc_url( $url ), esc_html( $title ) ); }
I think this is pretty self-explanatory. You can edit the way link is displayed on the last paragraph (sprintf). I’ve “Markdowninfied” it but you can edit it as you want.
If you want to wrap all of the text generated by Press This in a div, use the ThisWillApearBeforeAnythingElse string.In general, the best way to see how it works is to play with it ??
IMPORTANT!
Because this file is located in wp-admin directory, it is probably going to be replaced with each update. Bear that in mind.Hope it helps!
(it helped me)Forum: Themes and Templates
In reply to: Script to show different image for different posts by their IDGot some guidance on another forum:
<?php if(file_exists("images/post_images/".get_the_ID().".png")) { echo "<img src='images/post_images/".get_the_ID().".png' alt='".get_the_title()."' />"; } else { echo "<img src='images/post_images/rotate/rotate.php' alt='".get_the_title()."' />"; } ?>
Problem solved!
Forum: Hacks
In reply to: Modify "Press This" body templateIs there really no way to do this? ??
Forum: Themes and Templates
In reply to: Comment button not working – search button interfering?Resolved!
I have completely redesigned both my searchform.php and comments.php templates. I still have no idea what went wrong but it works now ??
Forum: Themes and Templates
In reply to: Comment button not working – search button interfering?I have also tried completely removing
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
If I try to comment then, all I can see is a blank page with URL:
https://pafell.pl/wp-comments-post.php
I really have no idea what else could I try. That’s not the first time I’ve created a WP theme but that’s the first time I got such a problem. Perhaps I have omitted something basic while developing the theme?
Forum: Themes and Templates
In reply to: Comment button not working – search button interfering?Tried uncommenting and removing the search box button code. Still same effect ??
Perhaps I could use other comments template? Where I could get it from?
Forum: Themes and Templates
In reply to: Comment button not working – search button interfering?Here‘s the link ??
Forum: Themes and Templates
In reply to: Comment button not working – search button interfering?Thanks for your reply! ??
I think I have that, although in a different way.
In my comments.php (line 144) I have:
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
Should I change that and hard-code it to:
<form id="commentform" method="post" action="https://pafell.pl/wp-comments-post.php">
?
Forum: Fixing WordPress
In reply to: Stuck on "Updating Plugin" while updating a pluginWell, so it seems that I’ll have to get used to this.
But thank you very much for your help anyway! ??