phillord / kcite

A reference list generator for Wordpress
Other
3 stars 2 forks source link

are fullcite and source='url' functional?? #6

Closed idea--list closed 10 years ago

idea--list commented 10 years ago

Hi there, Tried on several WP 3.9.1 installations but only doi and pubmed sources do work.

Fullcite and url sources will be displayed in the frontend as shortcodes. Typed them as in your examples (on your site they just work...) http://process.knowledgeblog.org/309 http://process.knowledgeblog.org/246

Am i doing something wrong or Is it maybe a bug?

Regards, Peter

phillord commented 10 years ago

Can you do a cut and paste from the text version of your article (just the bit with fullcite and a URL source), so I can check with exactly what you are using.

idea--list commented 10 years ago

Yes please, right from the text editor of WP:

[‍cite]http://www.russet.org.uk/blog/2071[/cite‍]

[‍fullcite author="Lord.P;Cockell.S;Stevens.R" title="Three Steps to Heaven" date="2012" location="Sepublica"]

These are the examples from your blog where they just work. I tried now on 2 hosted install and even on localhost (bitnami WP bundle) and they just will not be recognised as shortcodes. Instead they get rendered as plain text. On my side only doi and pubmed sources do work.

There are no other plugins running, tried several themes and nothing seems to help. This plugin is really great but i simply need to use url sources as well. Have you any idea what could i do?

idea--list commented 10 years ago

By the way if i insert this code in kcite.php just below line 254: $cite->identifier="www.russet.org.uk/blog/2071";

Then it works, but this way i just set the source for all the cites that have not got a specified source type...so there is a broken chain somewhere in the middle.

phillord commented 10 years ago

Okay, this is my fault and something that I have forgotten to change. On the process.knowledgeblog.org I use zero width spaces so that the short codes show verbatim. Unfortunately when you cut and paste them, you are actually copying the spaces also. If you delete the (zero width and invisible) space between [ and cite] then the first one works. The second fullcite example doesn't, and I don't know why at the moment.

idea--list commented 10 years ago

Well I downloaded the plugin v1.6.3 from wordpress.org. opened the plugin's folder on your blog and if readme.txt is right, then you have 1.6.2 on your blog. Is it the case? Am 18.06.2014 16:42 schrieb "Phil Lord" notifications@github.com:

Okay, this is my fault and something that I have forgotten to change. On the process.knowledgeblog.org I use zero width spaces so that the short codes show verbatim. Unfortunately when you cut and paste them, you are actually copying the spaces also. If you delete the (zero width and invisible) space between [ and cite] then the first one works. The second fullcite example doesn't, and I don't know why at the moment.

— Reply to this email directly or view it on GitHub https://github.com/phillord/kcite/issues/6#issuecomment-46444413.

phillord commented 10 years ago

Not sure I understand. I think you have everything set up correctly. Just try putting in a cite tag but do not cut-and-paste it from process.knowledgeblog. If you type it in again by hand, it will all work.

Phil

idea--list notifications@github.com writes:

Well I downloaded the plugin v1.6.3 from wordpress.org. opened the plugin's folder on your blog and if readme.txt is right, then you have 1.6.2 on your blog. Is it the case? Am 18.06.2014 16:42 schrieb "Phil Lord" notifications@github.com:

Okay, this is my fault and something that I have forgotten to change. On the process.knowledgeblog.org I use zero width spaces so that the short codes show verbatim. Unfortunately when you cut and paste them, you are actually copying the spaces also. If you delete the (zero width and invisible) space between [ and cite] then the first one works. The second fullcite example doesn't, and I don't know why at the moment.

— Reply to this email directly or view it on GitHub https://github.com/phillord/kcite/issues/6#issuecomment-46444413.


Reply to this email directly or view it on GitHub: https://github.com/phillord/kcite/issues/6#issuecomment-46445585

Phillip Lord, Phone: +44 (0) 191 222 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU

idea--list commented 10 years ago

I am not near my computer. Tomorrow i will try and let you know Am 18.06.2014 17:10 schrieb "Phil Lord" notifications@github.com:

Not sure I understand. I think you have everything set up correctly. Just try putting in a cite tag but do not cut-and-paste it from process.knowledgeblog. If you type it in again by hand, it will all work.

Phil

idea--list notifications@github.com writes:

Well I downloaded the plugin v1.6.3 from wordpress.org. opened the plugin's folder on your blog and if readme.txt is right, then you have 1.6.2 on your blog. Is it the case? Am 18.06.2014 16:42 schrieb "Phil Lord" notifications@github.com:

Okay, this is my fault and something that I have forgotten to change. On the process.knowledgeblog.org I use zero width spaces so that the short codes show verbatim. Unfortunately when you cut and paste them, you are actually copying the spaces also. If you delete the (zero width and invisible) space between [ and cite] then the first one works. The second fullcite example doesn't, and I don't know why at the moment.

— Reply to this email directly or view it on GitHub https://github.com/phillord/kcite/issues/6#issuecomment-46444413.


Reply to this email directly or view it on GitHub: https://github.com/phillord/kcite/issues/6#issuecomment-46445585

Phillip Lord, Phone: +44 (0) 191 222 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU

— Reply to this email directly or view it on GitHub https://github.com/phillord/kcite/issues/6#issuecomment-46448679.

idea--list commented 10 years ago

Ok, tried it. On a localalhost installation even fullcite works now. It was a tricky one with that zero width space. You know even in the beginning I did insert the shortcode in the text editor mode. So i really did not think there will be that space inserted. Since you made the suggestion i tried another way as well. In the text editor i clicked with the right mouse button within the content field, and selected "paste as plain text" in chrome's context menu. That did not help either. Then i changed to the visual editor mode and selected "paste as text" in TinyMCE editor. That way it did not work either. Then i tried to type it in the visual editor. I have hungarian keyboard layout and [ character is a combination of alt + f on it. But that is the fullscreen shortcut in WP's visual editor.... So the last resort was going back to text editor and give it a try. There i typed in every character manually and bingo!! I think you could make some hint on your blog and WP.org site how to do it right, because i was just about to loose my marbles :-) Cites of url type and even fullcite is working.

I was really happy and tried to make the same on the hosted installation but there i am facing some strange behavior. I will summarize it later.

idea--list commented 10 years ago

So i develop a website on a hosted WP and already tested and tried lots of plugins, etc. The server runs PHP 5.2.12-2 with suhosin patch 0.9.7 and MySQL 5.0.51a-14, libcurl is enabled.

The following text was written manually in the text editor of WP:

[cite]http://books.google.at/books?id=3XDLPrD7ynsC&printsec=frontcover&dq=horse+anatomy&hl=hu&sa=X&ei=PxeiU8qmD6Kw7Abq54GIDw&redir_esc=y#v=onepage&q&f=false[/cite]

[fullcite author="Lord.P;Cockell.S;Stevens.R" title="Three Steps to Heaven" date="2012" location="Sepublica"]

[cite]http://www.russet.org.uk/blog/2071[/cite]

Some strange things happen.

  1. When i deselect "render on client" option, then the post gets broken. Post title will be loaded but the content&footer,etc. will not get rendered.
  2. When i select "render on client" then the post loads in right and all the 3 shortcode types will be interpreted, but the content of $cite->identifier will get rendered in parentheses and it will not be translated to a more eye-friendly string by javascript. I have to delete both the fullcite and the url cite to get the "translation" back.

There are no other plugins running, tried on WP's default themes...so i just guess it is because of some server specific settings, or my database got junky because of the many plugins tested before. Really do not know.

idea--list commented 10 years ago

Then i have a production server with a clean install of WP. The server runs PHP 5.4.4 without suhosin and MySQL 5.5.31-0, curl enabled.

On this server all the 3 type of shortcodes will be rendered just as they should both when rendered on client-side and when generated on server-side. Whew!! Am really happy with this great plugin.

idea--list commented 10 years ago

Let me share you some suggestions that raised inside me:

  1. When "render on client" is opted in, fullcite does render an * as well that leads to an undefined link, so it just jumps to a 404 page. Am not sure if fullcite has a link attribute (That way it could be a manually configurable url type...that one could tweak, but it may hurt consistency) Can you just leave that * symbol out in case of fullcite?
  2. For me it seems that when you uninstall the plugin, it just does not remove its settings from wp_options table, and there is no reset defaults button implemented either.
  3. Actually rather a feature request: would be fine to have the ability of pulling in the cover images of the books. Maybe one could upload a default picture for the paper citations. And a similar templating function that OpenBooks plugin has implemented would be also a great addition!
  4. Perhaps you could take a look even how OpenBooks plugin has it own dialog panel to inject the right shortcode. I mean you select the parameters in a popup box, and then the shortcode will be inserted automatically. This way users could not mistype anything or have those zero-width invisible characters that just break functionality.

Now i wrote quite some lines altogether, i just want to give some feedback to make this already handy plugin even better.,

phillord commented 10 years ago

Thanks for the feedback -- I am sorry for the hassle the webpages and their zwj caused. It just didn't occur to me that it would cause this problem -- my defence can only be that its happened to others http://www.russet.org.uk/blog/2340. There is a better way of escaping shortcodes -- I think that they have added this since I wrote those posts (my excuse!) and I've know used this.

In response to your suggestions; 1) yeah, there is another issue about this, I think it's a bug 2) actually "clear cache" will remove the options (it's where I keep the cache) -- I should do this on plugin uninstallation I agree, and I'll add it. 3) Hmm, maybe, but making the display work might be a pain. 4) Yep, this would be good, but it's not high on my priority because I never use the wordpress editor. I'd certainly take a pull request on it though!