Page 4 of 7
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Mon Nov 07, 2011 4:11 pm
by jimmyphong
firetrap wrote:Jimmy thanks again! Love how it looks now!
Can't say it enough Jimmy is fantastic and so are his modules, this is an amazing addition to my site and vital for anyone who is serious about SEO!
The level of support that Jimmy provides is something I have never seen before!
Firetrap
No problem !
Wellcome
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Fri Nov 11, 2011 9:14 pm
by jimmyphong
[TUT] Login to write comment in CMS Module
Step 1: open file
Code: Select all
/catalog/language/you language file /news/article.php
add at the end before " ?> " tag with code
Code: Select all
$_['text_welcome'] = 'You must <a href="%s"> login </a> or <a href="%s"> register</a> to make comment';
Step2 : open file
Code: Select all
/catalog/controller/news/article.php
add before the code
Code: Select all
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/news/article.tpl')) {
$this->template = $this->config->get('config_template') . '/template/news/article.tpl';
} else {
$this->template = 'default/template/news/article.tpl';
}
add this code
Code: Select all
$this->data['logged'] = $this->customer->isLogged();
$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
Step 3: open file
Code: Select all
/catalog/view/theme/Spicylicious/template/news/article.tpl
find and add replace the code
Code: Select all
<?php if($allow_comment) { ?>
<div id="comment" class="comment">
<div id="comment-list"></div>
<h2><?php echo $text_writecomment; ?></h2>
<div id="comment-form">
<?php echo $text_name; ?><br />
<input type="text" name="comment_name" size="40" /><br />
<?php echo $text_email; ?><br />
<input type="text" name="comment_email" size="40"/><br />
<?php if($this->config->get('news_config_show_field_title')) { ?>
<?php echo $text_title; ?><br />
<input type="text" name="comment_title" size="40" /><br />
<?php } ?>
<?php if($this->config->get('news_config_show_field_website')) { ?>
<?php echo $text_link; ?><br />
<input type="text" name="comment_website" size="40" /><br />
<?php } ?>
<?php echo $text_text; ?><br />
<textarea rows="10" cols="70" name="comment_text"></textarea><br />
<?php echo $text_captcha; ?><br />
<input type="text" name="captcha" value="" /><br />
<img src="index.php?route=news/article/captcha" alt="" id="captcha" /><br />
<a id="add-comment" class="button"><span><?php echo $text_addcomment;?></span></a>
</div>
</div>
<?php } ?>
with the code
Code: Select all
<?php if($allow_comment) { ?>
<h2><?php echo $text_writecomment; ?></h2>
<div id="comment" class="comment">
<div id="comment-list"></div>
<?php if($logged) { ?>
<div id="comment-form">
<?php echo $text_name; ?><br />
<input type="text" name="comment_name" size="40" /><br />
<?php echo $text_email; ?><br />
<input type="text" name="comment_email" size="40"/><br />
<?php if($this->config->get('news_config_show_field_title')) { ?>
<?php echo $text_title; ?><br />
<input type="text" name="comment_title" size="40" /><br />
<?php } ?>
<?php if($this->config->get('news_config_show_field_website')) { ?>
<?php echo $text_link; ?><br />
<input type="text" name="comment_website" size="40" /><br />
<?php } ?>
<?php echo $text_text; ?><br />
<textarea rows="10" cols="70" name="comment_text"></textarea><br />
<?php echo $text_captcha; ?><br />
<input type="text" name="captcha" value="" /><br />
<img src="index.php?route=news/article/captcha" alt="" id="captcha" /><br />
<a id="add-comment" class="button"><span><?php echo $text_addcomment;?></span></a>
</div>
</div>
<?php }else { ?>
<div id="no-comment"><?php echo $text_welcome; ?></div>
<?php } ?>
<?php } ?>
the comment will be show login or register when not login !
Thank and Regards !
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Mon Nov 14, 2011 3:33 am
by jimmyphong
[TUT] Get article as sub menu for one category in top menu !
Code: Select all
The category name as toplevel menu, the articles in that category as submenu. Would be nice if it could be made automatically, so when I make a new article or categorie, the menu is modified.
Step 1 :
Openfile :
add at the end but before }?>
code :
Code: Select all
//function load article to child array for main categories , include when check Article to top menu = true and select by category id
public function getArticleTopmenubyCat($cat_id)
{
$result = $this->db->query("SELECT n.news_id,nd.news_titles,n.news_sort_order FROM ".DB_PREFIX."news n INNER JOIN ".DB_PREFIX."news_description nd ON(n.news_id = nd.news_id) INNER JOIN ".DB_PREFIX."news_to_store n2t ON(n.news_id = n2t.news_id) INNER JOIN ".DB_PREFIX."news_to_category nc ON(n.news_id = nc.news_id) AND news_category_id = '" . (int)$cat_id . "' AND n.news_top = '1' AND n2t.store_id='".(int)$this->config->get('store_id')."' AND nd.language_id='".(int)$this->config->get('config_language_id')."'");
return $result->rows;
}
Step 2:
Openfile :
Code: Select all
catalog/controller/common/header.php
find a code (line 205) :
Code: Select all
$news_category_children = $this->model_news_category->getNewsCategories($news_category['news_category_id']);
add after
code
Code: Select all
$news_article_children = $this->model_news_article->getArticleTopmenubyCat($news_category['news_category_id']);
foreach ($news_article_children as $article_child) {
$news_category_children_data[] = array(
'name' => $article_child['news_titles'] ,
'href' => $this->url->link('news/article', 'news_id='.(int)$article_child['news_id'])
);
}
Done !
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Mon Nov 14, 2011 6:50 pm
by Petran
Hello Jimmy,
I tried this but got the following error:
Code: Select all
Parse error: syntax error, unexpected T_PUBLIC in C:\Users\Petran\Desktop\USBWebserver v8_nl\root\catalog\model\news\article.php on line 221
Any idea?
Regards,
Petran
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Mon Nov 14, 2011 7:00 pm
by jimmyphong
@Petran
unexpected T_PUBLIC
you must add end of all but before }?> in file
catalog/model/news/article.php
code :
Code: Select all
public function getArticleTopmenubyCat($cat_id)
{
$result = $this->db->query("SELECT n.news_id,nd.news_titles,n.news_sort_order FROM ".DB_PREFIX."news n INNER JOIN ".DB_PREFIX."news_description nd ON(n.news_id = nd.news_id) INNER JOIN ".DB_PREFIX."news_to_store n2t ON(n.news_id = n2t.news_id) INNER JOIN ".DB_PREFIX."news_to_category nc ON(n.news_id = nc.news_id) AND news_category_id = '" . (int)$cat_id . "' AND n.news_top = '1' AND n2t.store_id='".(int)$this->config->get('store_id')."' AND nd.language_id='".(int)$this->config->get('config_language_id')."'");
return $result->rows;
}
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Mon Nov 14, 2011 7:38 pm
by Petran
I did just that.
I made a clean local install, installed your newscms script, made the changes you mentioned.
Then I got the error, tried it all over again, without succes. Seems I missed something but can't find what it is.
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Tue Nov 15, 2011 9:36 am
by jimmyphong
Petran wrote:I did just that.
I made a clean local install, installed your newscms script, made the changes you mentioned.
Then I got the error, tried it all over again, without succes. Seems I missed something but can't find what it is.
Has support in email !
Regrads
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Tue Nov 15, 2011 4:57 pm
by Petran
Jimmy,
Thank you so much for your support.
Your help was far more than I ever could expect.
Thanks
Kindly regards,
Petran
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Thu Nov 17, 2011 10:58 am
by jimmyphong
@Petran
No big deal, it is my responsibility, I will support you through with my CMS
Regards
Jimmy
installed but blank page now
Posted: Thu Nov 17, 2011 7:32 pm
by simplyd
Hi
I just purchased and installed this but now all i get is a blank front end... i can access the admin area and all looks ok, but my front end is now just a blank page
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Thu Nov 17, 2011 8:21 pm
by Petran
Simplyd,
If you use the vQmod version, try do disable your other vQmod plugins to see if they are compatible with each other.
Regards,
Petran
Re: installed but blank page now
Posted: Thu Nov 17, 2011 8:42 pm
by jimmyphong
simplyd wrote:Hi
I just purchased and installed this but now all i get is a blank front end... i can access the admin area and all looks ok, but my front end is now just a blank page
Ok now check you site again ! i has add a sameple News Categories and add this to top menu !
all position in top menu will be automatic when you check Top in Data tab in create Category Form page !
you must play some time with this module !
You problem becuase you are using both (vqmod and overwrite) !
only using one and one type when you download
Regrads
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Thu Nov 17, 2011 8:46 pm
by jimmyphong
issues have been resolved, so you use both method (vqmod and overwrite) at the same time, you only used one of two kinds, to do !
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Thu Nov 17, 2011 8:48 pm
by simplyd
OK, thanks for sorting this out Jimmy
much appreciated
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Fri Nov 18, 2011 11:08 pm
by jimmyphong
@ no problem simplyd !
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Wed Nov 23, 2011 10:13 am
by chrind
how can i add this to shoppica? is it possible?
greets
Re: [Release]Gallery + Blog + News CMS Opecart[VqMod]
Posted: Wed Nov 23, 2011 11:55 am
by jimmyphong
@chrind
Has been help you to do !
Nice to work !
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart
Posted: Thu Nov 24, 2011 10:50 am
by 5150studios
Hi Jimmy, please help I have paid and downloaded your plugin but I am having big issues with the Ajax .autocomplete function does not exist error.
I have copied over the fix files for my opencart install 1.5.1.3 but ajax is still not working within the admin panel.
this is the error in the Firebug console:
$("input[name='filter_name']").autocomplete is not a function
[Break On This Error] select: function(event, ui) {
Hope you can help as soon as possible as I have spent good money on this and it's probably an easy fix.
Cheers Mick
Re: [Release]Gallery + Blog + News CMS Opecart
Posted: Fri Nov 25, 2011 12:47 am
by jimmyphong
@5150studios
fix file has been send to you email !
Regards
Jimmy
Re: [Release]Gallery + Blog + News CMS Opecart
Posted: Thu Dec 01, 2011 12:20 am
by jimmyphong
Rewrite Gallery url Seo !!
with overwirte New CMS
Open file
Code: Select all
catalog/controller/common/seo_url.php
fine code (may be in line : 70)
Code: Select all
elseif(isset($this->request->get['album_id'])){
$this->request->get['route'] = 'news/gallery';
}
add after
Code: Select all
elseif($this->request->get['route'] = 'news/gallery'){
$this->request->get['route'] = 'news/gallery';
}
find code (may be in line 112-123)
Code: Select all
elseif($key == 'catid'){
$newscategories = explode('_', $value);
foreach ($newscategories as $newscategory) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'news_category_id=" . (int)$newscategory . "'");
if ($query->num_rows) {
$url .= '/' . $query->row['keyword'];
}
}
unset($data[$key]);
}
add after
Code: Select all
elseif($data['route'] == 'news/gallery'){
$url .= '/' . 'gallery';
}
change the "gallery " text with you text title
the url will change to
http://youwebsite.com/galley (when SEO enable)
With Vqmod
Open file :
find code (may be in line 215)
Code: Select all
if ($url[0] == 'album_id') {
$this->request->get['album_id'] = $url[1];
}
add after
Code: Select all
elseif($this->request->get['route'] = 'news/gallery'){
$this->request->get['route'] = 'news/gallery';
}
find code (may be line 239 - 151)
Code: Select all
elseif($key == 'catid'){
$newscategories = explode('_', $value);
foreach ($newscategories as $newscategory) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = 'news_category_id=" . (int)$newscategory . "'");
if ($query->num_rows) {
$url .= '/' . $query->row['keyword'];
}
}
unset($data[$key]);
}
add after
Code: Select all
elseif($data['route'] == 'news/gallery'){
$url .= '/' . 'gallery';
}
or download attachment file :