Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 21

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 'How Do I' Questions

 
 
LinkBack Thread Tools Display Modes
Old 25.05.2004, 19:04   #11 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 7
shady is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

Quote:
Originally Posted by jump
PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY a.ordering ASC" //This is what you change
    
); 
I do not have this. The closet I have is...


PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY c.ordering" 
And also..
PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY c.ordering" 
I've got the same problem
shady is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 26.05.2004, 08:14   #12 (permalink)
Expert Mamber
 
visualdensity's Avatar
 
Join Date: Apr 2004
Location: Melbourne
Posts: 385
visualdensity is on a distinguished road
Send a message via ICQ to visualdensity Send a message via MSN to visualdensity
Default Re: Section -> How do I change the default (10) number of content items displayed

Which line and which file?

I'll have a look.. the change should be the same. But just want to be sure.
__________________
"If you cannot win, make the one ahead of you break the record."
| Visualdensity.com |
visualdensity is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01.06.2004, 17:53   #13 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 7
shady is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

Hi

the file is the same
/components/com_content/content.php

i am using mambo Version : 4.5 Stable (1.0.7)

line 165-174

Code:
// get the list of other categories
	$database->setQuery( "SELECT c.*, COUNT(b.id) AS numitems"
	. "\nFROM #__categories AS c"
	. "\nLEFT JOIN #__content AS b ON b.catid = c.id $xwhere2"
	. "\nWHERE c.section='$category->section' $xwhere"
	. ($noauth ? "\n	AND c.access<='$gid'" : "" )
	. "\nGROUP BY c.id"
	. "\n	HAVING COUNT(b.id) > 0"
	. "\nORDER BY c.ordering"
	);
line 186 -193

Code:
// get the total number of records
	$database->setQuery( "SELECT count(id)"
		. "\nFROM #__content AS c"
		. "\nWHERE c.catid='$id' $xwhere"
		. ($noauth ? "\n	AND c.access<='$gid'" : "" )
		. "\nAND '$category->access'<='$gid'"
	);
	$total = $database->loadResult();
line 199-210

Code:
// get the list of items for this category
	$database->setQuery( "SELECT c.id, c.title, c.hits, c.created_by, c.created_by_alias,"
		. "\n	c.created AS created, c.access, u.name AS author, c.state"
		. "\nFROM #__content AS c"
		. "\nLEFT JOIN #__users AS u ON u.id = c.created_by"
		. "\nWHERE c.catid='$category->id' $xwhere"
		. ($noauth ? "\n	AND c.access<='$gid'" : "" )
		. "\nAND '$category->access'<='$gid'"
		. "\nORDER BY c.ordering"
		. "\nLIMIT $limitstart, $limit"
	);
	$items = $database->loadObjectList();
shady is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 11.06.2004, 05:34   #14 (permalink)
Baby Mamber
 
Join Date: Jun 2004
Posts: 14
hughesjr is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

In the section you have labeled as 199-210, change the line:

Code:
. "\nORDER BY c.ordering"
to

Code:
. "\nORDER BY c.created DESC"
and your categories will be sorted by descending created date....
hughesjr is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12.06.2004, 16:54   #15 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 7
shady is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

Quote:
Originally Posted by hughesjr
In the section you have labeled as 199-210, change the line:

Code:
. "\nORDER BY c.ordering"
to

Code:
. "\nORDER BY c.created DESC"
and your categories will be sorted by descending created date....
Thanks works perfect now
shady is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 27.06.2004, 11:23   #16 (permalink)
Junior Mamber
 
Join Date: Jun 2004
Posts: 29
ngvmambo is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

This thread has been helpful to me - thank you.

Is there a similar hack for making similar changes in the backend? i.e. I want to increase the default number of items displayed in the admin menus.

Thank you
ngvmambo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02.08.2004, 09:00   #17 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 14
headbanger is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

Quote:
Originally Posted by jump
PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY a.ordering ASC" //This is what you change
    
); 
I do not have this. The closet I have is...


PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY c.ordering" 
And also..
PHP Code:
    . ($noauth "\n    AND c.access<='$gid'" "" )
    . 
"\nGROUP BY c.id"
    
"\n    HAVING COUNT(b.id) > 0"
    
"\nORDER BY c.ordering" 
works great, thank you for ur help
headbanger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 03.08.2004, 04:50   #18 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 3
kalex is on a distinguished road
Default Re: Section -> How do I change the default (10) number of content items displayed

Visual,

Thank you for this post! This is my first day looking at this forum and this was exactly what I wanted to find here. I have been trying to find out where the line was that set the ordering of categories and items. I want my news items to appear by date published in my archive on my site. This hack worked perfectly and for my site, it does not affect other areas in a way that I can't handle.
kalex is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05.08.2004, 16:53   #19 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 3
kalex is on a distinguished road
Default Re: Content Sections.

Visualidenetity

Is there a way to have items in your admin list by date created rather than by ordering. In my admin section I want to have my items under content list by publish date and the same under mamblefish. Any ideas?
kalex is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08.08.2004, 06:26   #20 (permalink)
Baby Mamber
 
Join Date: Aug 2004
Posts: 14
headbanger is on a distinguished road
Default Re: Content Sections.

how do i make the ordering by Hits?
headbanger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Useful Links -> Embeding php scripts into mambo content afru Mambo 4.5 'How Do I' Questions 36 20.07.2006 22:44
Hide more content item info on category pages bulldog Mambo 5.0 Wishlist 13 07.05.2005 05:20
HELP! How do I get rid of "(x Items)" in content sections mkoenigs Mambo 4.5 'How Do I' Questions 2 10.01.2005 04:12
How to link content items to main menu afru Mambo 4.5 'How Do I' Questions 3 11.04.2004 16:16
all available conzent sections in use?????? artd2 Mambo 4.5 Allgemein 2 08.04.2004 10:16


All times are GMT +2. The time now is 05:28.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.