mod_Joomulus publish on specific pages of Virtuemart

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
CreaMs
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Fri Jul 17, 2009 5:02 pm
Contact:

mod_Joomulus publish on specific pages of Virtuemart

Post by CreaMs » Mon Sep 28, 2009 7:24 pm

Hi.....I got a problem with publishing mod_Joomulus on VM 1.1.3!
I need to hide this module at checkout VM page and publish on another all as well.
I search in joomulus code - something like

Code: Select all

if(JRequest::getVar('view', null) == ('frontpage') && $page!='shop.cart' && $page!='account.order_details' && $page !='shop.browse' && $page !='checkout.thankyou' && $page !='shop.product_details' && $page !='account.index' && $page !='account.billing' && $page !='account.shipping' && $page !='account.shipping' && $page !='account.shipto' && $page !='shop.registration')
But cannot find code according to publishing!
What i must to do?
Please help me,Guru!

Thanks
Best regargs,
Alex.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11394
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: mod_Joomulus publish on specific pages of Virtuemart

Post by ooffick » Tue Sep 29, 2009 11:06 am

Hi,

Can you try this one:

Code: Select all

$page = JRequest::getVar('page', null);
$view = JRequest::getVar('view', null);
if($view == ('frontpage') && $page!='shop.cart' && $page!='account.order_details' && $page !='shop.browse' && $page !='checkout.thankyou' && $page !='shop.product_details' && $page !='account.index' && $page !='account.billing' && $page !='account.shipping' && $page !='account.shipping' && $page !='account.shipto' && $page !='shop.registration')
Olaf
Olaf Offick - Global Moderator
learnskills.org

User avatar
CreaMs
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Fri Jul 17, 2009 5:02 pm
Contact:

Re: mod_Joomulus publish on specific pages of Virtuemart

Post by CreaMs » Tue Sep 29, 2009 4:55 pm

Code witch i published i dont find...
I search similary like - but nothing...
This is "modules/mod_joomulus/helper.php"

Code: Select all

<?php
// updated 11 May 2009
// by Joomlabears
defined('_JEXEC') or die('Restricted access');

class joomulusHelper {

	var $options;
	
	// gets module params
	function joomulusHelper($option) {
		$this->options = $option;
	}

//*********************** tags from module parameters
	function joomulus_tagwords_sd () { // build tagwords from SD list
		$tagcloud2 ='';
		$tagcloud = '<tags>';
		$tagcloud .= "<a href=''></a>";
		for($count = 1; $count <= 30; $count++) { // 20 is the number of tag parameters in the module backend
			if ($this->options[$count.'_name'] != null) {
				$tagcloud2 .= "<a href='".$this->options[$count.'_url']."' target='".$this->options['target']."' style='font-size:".$this->options[$count.'_size']."'>".$this->options[$count.'_name']."</a>\n ";
			}
			else
				break;
		}
		if (trim($tagcloud2)=='') {
			$tagcloud2 = "<a href='".JURI::base()."' target='".$this->options['target']."' style='font-size:20'>NOTHINGFOUND</a>\n ";
		}
		$tagcloud .= $tagcloud2.'</tags>';
		return $tagcloud;
	}
	function joomulus_altdiv_sd ($tags) { // build alternative div content (only contents inside the div!!!)
		return '<p>'.$tags.'</p>';
	}
	function joomulus_flashvars_sd($tags) { // build specific flashvars for this mode
		$tagcloud2 = 'mode: "tags", ';
		$tagcloud2 .= 'tagcloud: "'. urlencode($tags) . '" ';
		return $tagcloud2;	
	}

//******************* build flash HTML with SWFobject 
	function joomulus_createflashcode($tags, $altdiv, $subflashvars ) {
		global $joomlusModCount;
		global $mainframe;
		$name = 'modJoomulus';
		$version = $name.' 1.0.7.6';
		$soname = $name.'Instance';
		$divname = $name.$joomlusModCount;
		$flashtag='';
		$chaine='';
		//gets SWF based on user params
		$mainframe->addCustomHeadTag("\n<!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ -->");
		if ($this->options['swfobject']!='0') {
			$mainframe->addCustomHeadTag("\n<script type=\"text/javascript\" src=\"".JURI::base()."modules/mod_joomulus/swfobject.js\" ></script>\n");
		}		
		$movie = JURI::base().'modules/mod_joomulus/tagcloud.swf';

		// load  expressinstall.swf file,  ideally this would be  module parameter .. 
		$expressinstall = '"'.JURI::base().'modules/mod_joomulus/expressinstall.swf"';
	
		// add alternate div contents
		$chaine .= '<div class="modJoomulus_'.$this->options['moduleclass_sfx'].'" id="'.$divname.'">' . $altdiv . '</div>';
		
		$flashtag .= '<script type="text/javascript" >';
		$flashtag .= '	var flashvars = {';
		if ( $this->options['distr'] == '1' ) { $flashtag .= 'distr: "true",'; } else { $flashtag .= 'distr: "false",'; }
		$flashtag .= 'tcolor: "0x'.$this->options['tcolor'].'",';
		if ( $this->options['tcolor2'] == "" ) { $flashtag .= 'tcolor2: "0x'.$this->options['tcolor'].'",'; } else { $flashtag .= 'tcolor2: "0x'.$this->options['tcolor2'].'",'; }
		$flashtag .= 'hicolor: "0x'.$this->options['hicolor'].'",';
		$flashtag .= 'tspeed: "'.$this->options['speed'].'",';
		$flashtag .= 'scale_x: "'.$this->options['scale_x'].'",';
		$flashtag .= 'scale_y: "'.$this->options['scale_y'].'",';
		// add mode-specific flashvars and close flashvars section
		$flashtag .= $subflashvars . '}; ';
		$flashtag .= '	var params = {';
		if ( $this->options['trans'] == '1' ) { $flashtag .= 'wmode: "transparent",'; }
		$flashtag .= 'bgcolor: "'.$this->options['bgcolor'].'",';
		$flashtag .= 'allowscriptaccess: "sameDomain"';
		$flashtag .= '};';
		$flashtag .= ' var attributes = {';
		$flashtag .= '};';
		$flashtag .= ' var rnumber = Math.floor(Math.random()*9999999);'; // force loading of movie to fix IE weirdness
		$flashtag .= ' swfobject.embedSWF("'.$movie.'?r="+rnumber, "'.$divname.'", "'.$this->options['width'].'", "'.$this->options['height'].'", "9.0.115",'.$expressinstall.', flashvars, params, attributes);';
		$flashtag .= '</script>';
		// adds javascript to head page for loading joomulus SWF
		$mainframe->addCustomHeadTag("\n". $flashtag."\n");
		return $chaine;
	}
}	
?>
Say please, Dear Olaf, where it in code $page request check?
Best regargs,
Alex.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11394
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: mod_Joomulus publish on specific pages of Virtuemart

Post by ooffick » Tue Sep 29, 2009 7:54 pm

You could write that into the index.php file around the module.

Olaf
Olaf Offick - Global Moderator
learnskills.org

User avatar
CreaMs
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Fri Jul 17, 2009 5:02 pm
Contact:

Re: mod_Joomulus publish on specific pages of Virtuemart

Post by CreaMs » Tue Sep 29, 2009 9:01 pm

Thanks for answer, Olaf!
Can you please say me, at witch position i must added your code into index.php?
I need to past it into right module position - this is main code

Code: Select all

<?php endif; ?>
		
							<div id="mainmiddle" class="floatbox">
		
								<?php if($this->countModules('right') && !class_exists('JEditor')) : ?>
								<div id="right">
									<div id="right_container" class="clearfix">
										<jdoc:include type="modules" name="right" style="yoo" />
									</div>
								</div>
								<!-- right end -->
Best regargs,
Alex.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11394
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: mod_Joomulus publish on specific pages of Virtuemart

Post by ooffick » Wed Sep 30, 2009 8:05 am

e.g. find this:

Code: Select all

<jdoc:include type="modules" name="right" style="yoo" />
and replace it with this:

Code: Select all

<?php
$page = JRequest::getVar('page', null);
$view = JRequest::getVar('view', null);
if($view == ('frontpage') && $page!='shop.cart' && $page!='account.order_details' && $page !='shop.browse' && $page !='checkout.thankyou' && $page !='shop.product_details' && $page !='account.index' && $page !='account.billing' && $page !='account.shipping' && $page !='account.shipping' && $page !='account.shipto' && $page !='shop.registration'): ?>
<jdoc:include type="modules" name="right" style="yoo" />
<?php endif; ?>
Olaf
Olaf Offick - Global Moderator
learnskills.org


Locked

Return to “Extensions for Joomla! 1.5”