2012-09-24, 17:32:24
shawn_a Wrote:This is why you should prefix all your functions and global names so they are unique.
My functions are unique. Try not to jump to conclusions.
I will however, make them a bit more unique in the next version.

shawn_a Wrote:This is why you should prefix all your functions and global names so they are unique.
mikeh Wrote:Version 1.4.1 Added To Extend
- Fixed en_US.php lang file which was corrupted during push to github.
mikeh Wrote:Box Wrote:lr Wrote:FIXED.. old hosting 1and1 account. I had added to php.ini magic_quotes_gpc = off
but adding to the main directory was not enough. Added it also to sub directories admin and plugin/blog
and the error disappeared.
I have exact problem, but i didn't fixed... how to fix exactly please?
Thanks^ Should do the trick. Are you sure you put that in your php.ini? Try using the phpinfo() function to make sure it is off.Code:magic_quotes_gpc = off
kubikk Wrote:How can I display the date of the function:
<?php show_blog_recent_posts(); ?>
help pliz
mikeh Wrote:My functions are unique. Try not to jump to conclusions.
shawn_a Wrote:mikeh Wrote:My functions are unique. Try not to jump to conclusions.
I wasn't jumping to anything, that was a response to a post suggesting a conflicts.
I know your code like I know a good book.
Your plugin files and your functions names have no prefix.
"Cannot redeclare class Blog"
a class name of Blog is not unique
mh_blog would be.
When using a plugin or extensible system without special scoping you should prefix all variables and function names in global scope to avoid collisions with others.
When some other person releases a blog plugin and names their plugin blog.php or has a class called blog.
And someone tries to install both, then the exact error posted previously will be the result. It was just a logical suggestion of standardized practices.
newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again.Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
<meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
mikeh Wrote:newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again.Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
echo '  <a href="" class="read_more_link">'.$blogSettings['readmore'].'</a>';
echo '  <a href="'.$url.'" class="read_more_link">'.$blogSettings['readmore'].'</a>';
newdeepdan Wrote:mikeh Wrote:newdeepdan Wrote:I'm running GS v3.1.2 and did a fresh install of GS Blog v1.4.1, deleted all folders and cache, and now I'm unable to access my website or the admin section. I get a 500 Error, but after removing the plugin, the website loads fine and I'm able to access the admin section again.Did you try debug mode? Also try removing the en_us language file. Please make sure you are using GS Blog 1.4.1
I was able to get the plugin and website working, but I ran into this issue:
nice10150 Wrote:I'm using Get-Simple 3.1.2 with GS-Blog 1.4.1 and the descibtions of my blog post are all meshed up.... basically this is what I get...I have no idea what is going on here but I am looking into it. It seems to only happen if the page you have the blog set to does not have a meta description.
Here is a source view of one of my blog posts... It's nothing Google or any other search engine likes to see...
Code:<meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
Anybody knows what is going wrong?
influxweb Wrote:@islander and @mikehI will add this in the next version.
I was reading @islanders post on the I18N Search topic (http://get-simple.info/forum/post/30945/#p30945) regarding hooking GS Blog to be searchable with said plugin. I attempted to place the code in...with disastrous results. I didn't see any other formal way of requesting a feature addition, so I though this would be the best way. Can the hooks be added into the GS Blog module to allow searching this way?
Thank you,
Matt
mikeh Wrote:I will add this in the next version.
mikeh Wrote:I will add this in the next version.Awsome, I cant wait. Thanks for the great work.
mikeh Wrote:nice10150 Wrote:I'm using Get-Simple 3.1.2 with GS-Blog 1.4.1 and the descibtions of my blog post are all meshed up.... basically this is what I get...I have no idea what is going on here but I am looking into it. It seems to only happen if the page you have the blog set to does not have a meta description.
Here is a source view of one of my blog posts... It's nothing Google or any other search engine likes to see...
Code:<meta name="description" content=".blog_post_thumbnail { width:200px; height:auto; float:left; padding-right:10px; padding-bottom:10px; } .blog_post_container { clear:both; }" />
Anybody knows what is going wrong?
RewriteRule ^blog/post/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
RewriteRule ^blogpost/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
mig21 Wrote:Hello MikehWhere do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG
mikeh Wrote:mig21 Wrote:Hello MikehWhere do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG
mig21 Wrote:Well that is tricky because the excerpt function removes html, and the line breaks are of course, html.mikeh Wrote:mig21 Wrote:Hello MikehWhere do you want the linebreak? After the post title and before the content? Or after the content and before the "read more" link?
best blog plugin so far! Just one request (the same has been posted for other blog plugis, too, but no one solved it so far). I need to have the excerpt with line break!
e.g. instead of: "Dear friends with this letter..." I need:
"Dear friends
with this letter..."
You think this is possible to implement?
Thanks
MiG
Actually I want to see the line breaks that are already in the content, also in the excerpt, just as I see them in the full text. See example blog.avanti-papi.ch ! In the excerpt there is nor line break between the salutation (Hallo Avanti Papis) and the text (bekanntlich geht der Krug...), but in the content there is one. An example where it is the way I want it is: http://blog.swiss.com/
As you can see, the excerpt is with line breaks, too.
<?php
/**
* Create Excerpt for post
*
* @param $content string the content to be excerpted
* @param $start int the starting character to create excerpt from
* @param $maxchars int the amount of characters excerpt should be
* @return string The created excerpt
*/
public function create_excerpt($content, $start, $maxchars)
{
$maxchars = (int) $maxchars;
$content = substr($content, $start, $maxchars);
$pos = strrpos($content, " ");
if ($pos>0)
{
$content = substr($content, $start, $pos);
}
$content = htmlspecialchars_decode($content);
$content = str_replace(i18n_r(BLOGFILE.'/READ_FULL_ARTICLE'), "", $content);
return $content;
}
?>
$content = htmlspecialchars_decode($content);
mikeh Wrote:What you can do is in plugins/blog/class/primary/Blog.php, edit the create_excerpt function and remove the strip_tags and strip_decode functions as seen below:
...