Hi Ayza,
what errors and warnings are you actually refering to? I found only the css errors and this ones were related to the transparent background? If you remove them there are no css errors or warnings anymore with the validator.
I just setup a rather clean page (ok I know the css on my page is not that clean), to validate on the share this code.
Here is the HTML validator Output http://validator.w3.org/check?verbose=1&uri=http://www.lars-kirchhoff.de/go/site/test and the CSS validator Output http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http://www.lars-kirchhoff.de/go/site/test.
The HTML validator gives me just an error on a ul element not related to the share this code and the CSS validator gives me some errors related to the opacity properties. But when removed all errors related to the share this code disappear.
/lars
Hello,
the “target=_blank” in the HTML doesn’t validate because it’s depreciated in most doctypes. I deleted these from the plugin php doc. You might want to add a javascript version in future versions of the plugin.
I also get a few CSS errors. The ones refering to opacity I can live with: 11 #share_this_form attempt to find a semi-colon before the property name. add it 0 #share_this_form Parse Error - null 11 #share_this_form Property opacity doesn’t exist : 90 11 #share_this_form Parse Error - 90); 16 Parse Error - :0.9; MozOpacity:0.9; opacity:0.9; } #share_this_form a.share_this_close
I definitely don’t get the first error since #share_this_form is the first in the document. The second parse error is also weird.
Anyhow, I gathered from previous posts in this thread that it ought to be possible to use the plugin on a multi-entry page. How? I put it within it’s own exp:weblog entries tags and tried with different settings of no other parameters than the weblog name, added the right category, and finally also limit=”1”. That bookmarked the first entry on the page, but not the multi-entry page itself.
I think you mentioned that the plugin needed an entry_id to work, who does this work with a multientry page?
😊
Ayza
Hey Ayza,
You are right about the target=”_blank “. I had just removed it from my installation. Now I’ve just updated the zip file with removed target=”_blank “ and removed opacity css settings to be standard compliant while installation. everyone else, who might want this might just add this later.
This is how I use this on my page on the multiple entries page:
{exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="5" disable="member_data|trackbacks"}
<code>
{exp:share_this url="{title_permalink={my_journal_group}/comments}" title="{title}" entry_id="{entry_id}" orientation="top"}
<code>
{/exp:weblog:entries}
I hope this helps..
/lars
Ok for that I would put it in an extra weblog:entries field with limit 1 and add some parameter like this: (this would be to set a link for the category).
{exp:weblog:entries weblog="{my_weblog}" limit="1"}
<code>
{exp:share_this url="<link_to_your_category>" title="<category_title>" entry_id="<category_id>" body_text="<category_description>" orientation="top"}
<code>
{/exp:weblog:entries}
This would create a share this link for a given category. You don’t need to set the entry_id to whatever you want. It’s actually only necessary if no title or bodytext is given as parameter.
/lars
Hi, almost there. I tried to remove the entry_id as well as set it to null (i.e. entry_id=”“) but then nothing showed. Same if I just wrote entry_id=”<category_id>”.
I did get it working by using the following code and wrapping the category_id in category tags. I did the same for the category:description but that didn’t seem to have any effect on the error message:
{exp:weblog:entries weblog="{master_weblog_name}" limit="1" disable="custom_fields|member_data|trackbacks|pagination"}
{exp:share_this url="{path={template_group_name}/press}" title="Hi! Entertainment Press Center" entry_id="{categories}{category_id}{/categories}" body_text="{category_description}" link_title="bokmärk / tipsa om sidan" orientation="top"}
{/exp:share_this}
{/exp:weblog:entries}
But then I got the following error message at the top of the page:
Notice: Undefined index: field_id_2 in /hsphere/local/home/hejhej/hientertainment.se/flow/plugins/pi.share_this.php on line 138 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/hejhej/hientertainment.se/flow/plugins/pi.share_this.php:138) in /hsphere/local/home/hejhej/hientertainment.se/flow/core/core.functions.php on line 707
Any idea what’s going on?
😊
Ayza
ok, that was a bug in the plugin. I did’t check if the database query has a valid result. The plugin starts to query the database as soon as the title or body_text flag is either not set or the value is empty. So in your case the category_description is empty, which resulted in a database query with the wrong id. This is why the error was shown.
This is the code I’ve setup on my test page here: http://www.lars-kirchhoff.de/go/site/test
{exp:share_this url="{path={my_journal_group}/section/{categories}{category_name}{/categories}}" title="{categories}{category_name}{/categories}" entry_id="{categories}{category_id}{/categories}" body_text="{categories}{category_description}{/categories}" orientation="bottom"}
<code>
{/exp:share_this}
I’ve updated the zip file with the corrected bug 😉. The current version number should be 1.0.4.
/lars
Hi Lars,
sorry it took me some time to get back to you but I’ve been down with the flu.
I updated the plugin and the share_this js and tried it out on the single entry pages where it worked before. Now it reloads the page as soon as I click on the share this link and you have to be awfully quick if you want to click on any of the links. Have a look: http://www.hientertainment.se/index.php/webb/pressreleaser/pressmeddelande-2007-02-05/
The code in the template is:
{exp:share_this entry_id="{entry_id}" url="{title_permalink={template_group_name}/pressreleaser}" title="{title}" url="{title_permalink={template_group_name}/pressreleaser}" link_title="bokmärk / tipsa om sidan" orientation="top"}
{exp:email:tell_a_friend charset="utf-8" allow_html='n'}
<fieldset>
<label for="name">Ditt namn</label>
<input class="active" type="text" id="name" name="name" value="" />
<label for="to">Din kompis e-postadress </label>
<input class="active" type="text" id="to" name="to" />
<label for="subject">Ämne</label>
<input class="active" type="text" id="subject" name="subject" size="40" value="Ett tips om en trevlig kväll!" />
<label for="message">Meddelande</label>
<textarea id="message" name="message" cols="1" rows="10">
{title}
{summary}
{permalink}
</textarea>
{if captcha}
Var snäll att skriva in ordet du ser i bilden nedan:
{captcha}
<input type="text" name="captcha" value="" maxlength="20" />
{/if}
<input name="submit" class="submit" type='submit' value='Skicka!' />
</fieldset>
{/exp:email:tell_a_friend}
{/exp:share_this}
I would prefer to get this reload business nailed before I turn to the multi-entry page since I’m editing a live website. Any ideas what is causing the reload?
Ayza
Hi Ayza,
the problem was that I forgot to package the updated php file in the zip. This caused a javascript error, which forced the site to reload. Please update the plugin or add this code after line #223.
<li><a href="#">Mister Wong</a></li>
Sorry for the inconvenience.
/lars
Hi Lars,
I ran across a compressed version of Prototype (download here). You think it’ll be usable to bring down loadtimes, and if so, which of the different versions?
/ Ayza
Hello again Lars,
I don’t know if something broke in the last update of the plugin. The e-mail/tellafriend form used to work, now it’s blank and doesn’t even show up in the source code. The email module is installed so that isn’t the problem.
Of course, there is also the possiblility that I’ve done something wrong. The page is here and here’s the code:
{exp:share_this url="{path={template_group_name}/index}" title="Välkommen till Hi! Entertainment" entry_id="{categories}{category_id}{/categories}" body_text="{categories}{category_description}{/categories}" orientation="top" link_title="bokmärk / tipsa om sidan"}
{exp:email:tell_a_friend charset="utf-8" allow_html='n'}
<fieldset>
<label for="name">Ditt namn</label>
<input class="active" type="text" id="name" name="name" value="" />
<label for="to">Din kompis e-postadress </label>
<input class="active" type="text" id="to" name="to" />
<label for="subject">Ämne</label>
<input class="active" type="text" id="subject" name="subject" size="40" value="Ett tips om en trevlig kväll!" />
<label for="message">Meddelande</label>
<textarea id="message" name="message" cols="1" rows="10">
{title}
{summary}
{permalink}
</textarea>
{if captcha}
Var snäll att skriva in ordet du ser i bilden nedan:
{captcha}
<input type="text" name="captcha" value="" maxlength="20" />
{/if}
<input name="submit" class="submit" type='submit' value='Skicka!' />
</fieldset>
{/exp:email:tell_a_friend}
{/exp:share_this}
Any ideas?
Ayza
Hi Lars, I ran across a compressed version of Prototype (download here). You think it’ll be usable to bring down loadtimes, and if so, which of the different versions? /Ayza
Unfortunately I couldn’t get any of the versions to run. All of them gave me error message, just loading the library. Maybe I’m doing something wrong. I might check this out later. But I found another compressed prototype version, which is working, here: http://www.stevekallestad.com/blog/prototype_150_compressed.html
It’s about 30K in size. Of course it will bring down loadtimes, but if you are interested to bring down load times I would start looking at output compression of the webserver. that helps a lot in speeding up the site. for apache server have a look here: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
/lars
Hello again Lars, I don’t know if something broke in the last update of the plugin. The e-mail/tellafriend form used to work, now it’s blank and doesn’t even show up in the source code. The email module is installed so that isn’t the problem.
the code seems fine and the download zip has the same code I am using on my page. strange… could you send me an email with the plugin php file you are using.
/lars
Hi there, Lars.
I lost you on this one. I didn’t get any update that you had posted a reply. Now I’m revisiting this problem having used a temporary fix.
The problem is that the E-mail tab is completely blank (in the source too) apart from the text on the tab itself. The weird thing is that I get the same error on two different EE installations with two different hosts.
I have: 1) Uninstalled and reinstalled the email module . 2) Re-downloaded the Share This plugin (yesterday) and re-uploaded it to the server using ASCII decoding. 3) Copied the content of the .css file and the .js files and pasted them into my embedded EE cssfiles and jsfiles. (I also tried linking to the original files with no difference) 4) Pasted the code exactly from your site (see below) 5) Created a tellafriend page and made an ordinary link to it to verify that the function itself works. It does. (According to the EE docs, the tellafriend form needs to be linked to to show) 6) I tried taking away the form specific code in the Share this tellafriend part and just pasting in the link I used above. Nothing showed.
Now I’m stumped on how to proceed.
/ Ayza
Current code that shows the Social Media part alright, but the e-mail form is blank:
{exp:share_this url="{title_permalink={template_group}/rundtur}" title="{title}" entry_id="{ entry_id}" orientation="top"}
{exp:email:tell_a_friend charset="utf-8" allow_html='n'}
<label for="from">Your Email: </label>
<input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" />
<label for="name">Your Name: </label>
<input type="text" id="name" name="name" size="40" maxlength="35" value="{member_name}" />
<label for="to">To: </label>
<input type="text" id="to" name="to" size="40" maxlength="35" />
{if captcha}
<label for="captcha">Captcha: </label>
<input type="text" name="captcha" value="" size="10" maxlength="20" style="width:100px;" />
<label> </label>
{captcha}
{/if}
<label for="submit"> </label>
<input id="submit" name="submit" type='submit' value='Submit Form' />
<input type="hidden" id="subject" name="subject" value="Interesting Post: {title}" />
<input type="hidden" id="message" name="message" value="{url_title_path="{template_group}/rundtur"}" />
{/exp:email:tell_a_friend}
{/exp:share_this}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.