Jump to content

how to put your own php into a right column module


vahid abdi

Recommended Posts

hello guys

i wrote a code which selects some data from database and i want to put them into a column modules for example atsuperblock

in thsi module there is a atsuperblock.php which assigns two variables called title and content to the tpl file.. but when i put my own code into this php file and wanna assign another variable to show in tpl it loads just blank page and also i can't put php codes into tpl file

so?!!!

should i create a new module or i could edit these modules in order i want?

 

thanks :)

Link to comment
Share on other sites

 

Hi, you have to call the function that will put your code in the right Column called  hookRightColumn

this way:

 public function install()
	{
	  
	 
	  if (!parent::install() ||
		!$this->registerHook('rightColumn') 	
		
	
		
	  )
		return false; 		
		
	  return true;
	}
public function hookRightColumn($params){
return "your code here";

}

and where should I put this code u wrote for me exactly?

tnx for answering

Link to comment
Share on other sites

well i'm not familiar with modules much yet so i put that code in the php file of module that starts with name,tab,version,author..and stuff but still i got blank page.

and no matter if i put my own code into the code place("your code here") or not.. it loads blank page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...