Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 9:34 am (All times are UTC )

 




Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2
Author Message
Posted: Mon Mar 30, 2009 6:31 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
Thank you for the tutorial. After reading it, I have some questions.

I am using the beez template and want to turn of the date created text in the search results. I was able to remove that text by editing components/com_search/views/views/search/view.html.php.

How can I override that view? I tried by copying view.html.php in the templates/beez/html/com_search/search folder. However, it does not work.

Can you clarify my doubt.

Thanks,
Sonal


Top
  E-mail  
 
Posted: Mon Mar 30, 2009 11:27 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Fri Aug 12, 2005 2:45 am
Posts: 1581
Location: Toowoomba, Australia
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.

_________________
Andrew Eddie - Tweet @AndrewEddie
<><
http://www.theartofjoomla.com
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.


Top
   
 
Posted: Tue Mar 31, 2009 8:08 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Mar 18, 2007 12:50 pm
Posts: 324
Location: Netherlands
Great Work!

_________________
Cheers, M.
-------------------
theplayerspool.com
trainingtrips.eu


Top
  E-mail  
 
Posted: Thu Apr 02, 2009 10:53 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Feb 27, 2008 4:03 pm
Posts: 123
Location: UK
masterchief wrote:
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.

Is it possible to override the view.html.php in any way? I'm sure I read that you can override any models, views, etc.

I've modified the way the weblinks submission component works (removed the need to have an account). However I'd prefer to use an override, so changes don't get reverted when Joomla gets updated. Is this possible?

_________________
"Maybe I shouldn't have eaten that packet of powdered gravy I found in the parking lot."
http://www.simpsoncrazy.com


Top
  E-mail  
 
Posted: Thu Apr 02, 2009 12:43 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Fri Aug 12, 2005 2:45 am
Posts: 1581
Location: Toowoomba, Australia
If you are wanting to go that far, you are probably better off copying the whole search component and making changes.

_________________
Andrew Eddie - Tweet @AndrewEddie
<><
http://www.theartofjoomla.com
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.


Top
   
 
Posted: Fri Apr 03, 2009 3:57 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
masterchief wrote:
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.



Got it! Thank you for your help.

Sonal


Top
  E-mail  
 
Posted: Fri Apr 03, 2009 4:01 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
Please confirm if my understanding is correct for the following edits I need to make.

*) I was able to remove the 'data created' text in the search results. I need to replace it with another date. This should be a plugin, correct?

*) I want the search areas to be changed from Category, Section, Article to specific categories for the website I am updating(eg. Books, References, etc). For that I will need to write a plugin and edit the SQL query, correct?

Thank you for your help.

Sonal


Top
  E-mail  
 
Posted: Tue Apr 14, 2009 11:45 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Feb 20, 2009 12:30 am
Posts: 24
Nice tutorial but I think I need to re-read.....or better, I'm goint to print it to study some ot its lines.

_________________
http://www.cyberpasta.com


Top
  E-mail  
 
Posted: Sun May 24, 2009 6:21 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Nov 14, 2006 3:29 am
Posts: 112
[quote="svivian"]Is it possible to override the view.html.php in any way? I'm sure I read that you can override any models, views, etc.[/quote]
I'd like to know about this too, there are many times I just want to tweak a few design elements without making my own complete component. Often it is little things like Page numbers appearing in Page Titles that most of my clients dont like.


Top
  E-mail  
 
Posted: Fri Jun 12, 2009 7:06 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Mar 18, 2007 12:50 pm
Posts: 324
Location: Netherlands
You do depend on the variables that the view.html.php sends to the layout (or that the layout grabs from the view.html.php, if you prefer). But you can perform additional tasks in your layout page (like getting stuff from the database or re-formatting content).
Quote:
Often it is little things like Page numbers appearing in Page Titles that most of my clients dont like.
That's actually coming from a content plugin (pagebreak.php). You cannot alter this (well, you can, but you shouldn't). You could however duplicate this plugin, rename it and use it instead of the original. Than tweak it in anyway you like (this plugin also renders the table of content in multi-page articles).

_________________
Cheers, M.
-------------------
theplayerspool.com
trainingtrips.eu


Top
  E-mail  
 
Posted: Fri Jul 03, 2009 10:00 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Dec 10, 2008 1:39 pm
Posts: 94
Location: Germany
Greetings,

I also have a bit of a problem, and with the good old com_search, now basically all I want is a raw view for Ajax, but the standard search has none, and if I override the normal view... well we all know what happens then..You kill your normal search

So Something that would be nice in future version, is to be able to add/extend, and not just override. This way one can add views to existing components, without really touching them.

Maybe this is already possible ???

_________________
Whatever you do will return to you, three folded


Top
  E-mail  
 
Posted: Fri Jul 10, 2009 7:34 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Jul 10, 2009 7:26 am
Posts: 1
I m new to joomla can you help for getting data into tabular format and with pagination. actually i dont know what I have to do for this.


Top
  E-mail  
 
Posted: Sat Jul 11, 2009 2:42 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri May 22, 2009 9:04 am
Posts: 20
masterchief wrote:
I've done an extensive tutorial on layout overrides (and a few other things) on the developer site:
http://developer.joomla.org/tutorials/3 ... oomla.html

Hope people find it useful and if there is anything missing or anything is unclear let me know.


It's really good, thanks a lot :)


Top
  E-mail  
 
Posted: Sun Jul 12, 2009 3:16 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Aug 11, 2008 1:16 am
Posts: 312
I tried experimenting with this on a localhost site with RUK_Milkyway.
I'm not sure what that "sliders" chrome does, but I went with implementing it
on the mod_login, since i wanted to enhance that one anyway, just to see what would happen.

I copied the mod-login recursively into the template html directory, I placed the xtml tag in the form
and set name to 'login".

Nothing happened at all. Is this because it is not MVC?


Top
  E-mail  
 
Posted: Fri Aug 28, 2009 9:32 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Aug 26, 2009 2:19 am
Posts: 134
Location: Jeddah-Saudi Arabia
thanks chef
i just started reading it
it is fabulous

_________________
PHP designer,
manager,RISEMYWEB
http://www.9or.cc | صور
http://www.risemyweb.com | موقعي


Top
  E-mail  
 
Posted: Mon Aug 31, 2009 11:43 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Jan 24, 2009 3:13 pm
Posts: 4
Thank you.


Top
  E-mail  
 
Posted: Thu Sep 17, 2009 3:31 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Feb 07, 2008 3:08 pm
Posts: 116
Got it! Thank you for your help.

_________________
http://www.paikad.com/index.php/ครีมหน้าขาว.html
http://www.paikad.com


Top
  E-mail  
 
Posted: Fri Oct 23, 2009 9:53 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 30, 2009 6:11 pm
Posts: 10
In my template I wanted to show modules ina postion one after another in the same row.I tried <jdoc:include type="modules" name="user1" style="horz"/> but it didnt give me the result i needed.I replaced it with <jdoc:include type="modules" name="user1" style="horizontal"/>
and edited 'templates/mytemplate/html/modules.php' and added function modChrome_horizontal($module, &$params, &$attribs) like this
unction modChrome_horizontal($module, &$params, &$attribs)
{
$curtemplate = JDocumentHTML::getInstance();

if($GLOBALS[$attribs['name']."_pos"]+0 == 0)
{
?>
<table align="center" width="100%">
<tr>
<?php

}
?>
<td valign="top">
<?php

modChrome_table($module, $params, $attribs); ?>
</td>
<?php
$GLOBALS[$attribs['name']."_pos"]++;
if($curtemplate->countModules($attribs['name']) == $GLOBALS[$attribs['name']."_pos"])
{
?>
</tr>
</table>
<?php
}
}

If there is a better way than this please let me know


You do not have the required permissions to view the files attached to this post.

_________________
Best regards
Sreekanth Dayanand
http://www.outsource-online.net


Top
  E-mail  
 
Posted: Sat Nov 14, 2009 3:35 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Feb 07, 2008 3:08 pm
Posts: 116
outsource wrote:
In my template I wanted to show modules ina postion one after another in the same row.I tried <jdoc:include type="modules" name="user1" style="horz"/> but it didnt give me the result i needed.I replaced it with <jdoc:include type="modules" name="user1" style="horizontal"/>
and edited 'templates/mytemplate/html/modules.php' and added function modChrome_horizontal($module, &$params, &$attribs) like this
unction modChrome_horizontal($module, &$params, &$attribs)
{
$curtemplate = JDocumentHTML::getInstance();

if($GLOBALS[$attribs['name']."_pos"]+0 == 0)
{
?>
<table align="center" width="100%">
<tr>
<?php

}
?>
<td valign="top">
<?php

modChrome_table($module, $params, $attribs); ?>
</td>
<?php
$GLOBALS[$attribs['name']."_pos"]++;
if($curtemplate->countModules($attribs['name']) == $GLOBALS[$attribs['name']."_pos"])
{
?>
</tr>
</table>
<?php
}
}

If there is a better way than this please let me know


Thank You So Eazy.

_________________
http://www.paikad.com/index.php/ครีมหน้าขาว.html
http://www.paikad.com


Top
  E-mail  
 
Posted: Mon Nov 23, 2009 10:51 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Sep 01, 2009 12:40 pm
Posts: 63
Hello everyone,
I need to override the com_registration, I need to add another field ( 2 radio buttons for the user to select one option or the other.. ).
I have been looking around for tips and stuff, but I cant really find the file that generates the page.

Any help?


Top
  E-mail  
 
Posted: Mon Nov 23, 2009 8:43 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Feb 27, 2008 4:03 pm
Posts: 123
Location: UK
blablaz wrote:
Hello everyone,
I need to override the com_registration, I need to add another field ( 2 radio buttons for the user to select one option or the other.. ).
I have been looking around for tips and stuff, but I cant really find the file that generates the page.

Any help?

That's not what layout overrides are for. They're only for changing the output of what's already there. You'll have to either find a dedicated user component, or maybe read this tutorial and see if that helps you with where to edit code.

_________________
"Maybe I shouldn't have eaten that packet of powdered gravy I found in the parking lot."
http://www.simpsoncrazy.com


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2

Quick reply

 



Who is online

Users browsing this forum: Batch1211, piotr_cz, saugata, WebstudioUpt and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group