Post by jimmyphong » Mon Nov 07, 2011 4:11 pm

firetrap wrote:Jimmy thanks again! Love how it looks now! ;D

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

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by jimmyphong » Fri Nov 11, 2011 9:14 pm

[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

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by jimmyphong » Mon Nov 14, 2011 3:33 am

[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 :

Code: Select all

catalog/model/news/article.php
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
Last edited by jimmyphong on Mon Nov 14, 2011 7:57 pm, edited 1 time in total.

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by Petran » Mon Nov 14, 2011 6:50 pm

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

Regards,
Petran

http://www.pavana.nl


Newbie

Posts

Joined
Fri Jul 01, 2011 10:45 pm

Post by jimmyphong » Mon Nov 14, 2011 7:00 pm

@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
Last edited by jimmyphong on Mon Nov 14, 2011 7:56 pm, edited 1 time in total.

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by Petran » Mon Nov 14, 2011 7:38 pm

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.

Regards,
Petran

http://www.pavana.nl


Newbie

Posts

Joined
Fri Jul 01, 2011 10:45 pm

Post by jimmyphong » Tue Nov 15, 2011 9:36 am

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

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by Petran » Tue Nov 15, 2011 4:57 pm

Jimmy,

Thank you so much for your support.

Your help was far more than I ever could expect. :ok:

Thanks

Kindly regards,
Petran

Regards,
Petran

http://www.pavana.nl


Newbie

Posts

Joined
Fri Jul 01, 2011 10:45 pm

Post by jimmyphong » Thu Nov 17, 2011 10:58 am

@Petran
No big deal, it is my responsibility, I will support you through with my CMS

Regards
Jimmy

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by simplyd » Thu Nov 17, 2011 7:32 pm

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

Newbie

Posts

Joined
Thu Nov 17, 2011 7:30 pm

Post by Petran » Thu Nov 17, 2011 8:21 pm

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

Regards,
Petran

http://www.pavana.nl


Newbie

Posts

Joined
Fri Jul 01, 2011 10:45 pm

Post by jimmyphong » Thu Nov 17, 2011 8:42 pm

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

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by jimmyphong » Thu Nov 17, 2011 8:46 pm

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

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by simplyd » Thu Nov 17, 2011 8:48 pm

OK, thanks for sorting this out Jimmy

much appreciated

Newbie

Posts

Joined
Thu Nov 17, 2011 7:30 pm

Post by jimmyphong » Fri Nov 18, 2011 11:08 pm

@ no problem simplyd !

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by chrind » Wed Nov 23, 2011 10:13 am

how can i add this to shoppica? is it possible?

greets

Newbie

Posts

Joined
Wed Nov 23, 2011 10:11 am

Post by jimmyphong » Wed Nov 23, 2011 11:55 am

@chrind

Has been help you to do !
Nice to work !

Regards
Jimmy

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by 5150studios » Thu Nov 24, 2011 10:50 am

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

Newbie

Posts

Joined
Thu Nov 24, 2011 10:47 am

Post by jimmyphong » Fri Nov 25, 2011 12:47 am

@5150studios
fix file has been send to you email !

Regards
Jimmy

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by jimmyphong » Thu Dec 01, 2011 12:20 am

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 :

Code: Select all

vqmod_newscms.xml.old
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 :

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am

Who is online

Users browsing this forum: No registered users and 58 guests