Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2006, 01:22 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
No pagination for stories in profile

If you view someone's profile and lets say, for example, you want to view their published stories so you click on the published stories link in their profile. The problem is that it only shows one page (8 stories in my case) of stories even though the user might have 30 stories published. I have added "previous" and "next" page buttons so no matter what link you click on in someone's profile, be it published stories, sent stories, etc etc, you will be able to see all the stories in that particular category instead of only one page.

I'm gonna try my best to remember how I added the pagination. In your user_center.tpl replace this php switch statement
PHP Code:
{php}
Global 
$db$main_smarty$view$user$rows$page_size$offset;

switch (
$view) {
    case 
'history':
        
do_history();    
        break;
    case 
'published':
        
do_published();
        break;
    case 
'shaken':
        
do_shaken();
        break;
    case 
'profile':
        default:
        break;
    
    case 
'removefriend':
        
do_removefriend();
        break;
    case 
'addfriend':
        
do_addfriend();
        break;

    case 
'viewfriends':
        
do_viewfriends();
        break;

    case 
'viewfriends2':
        
do_viewfriends2();
        break;

    case 
'sendmessage':
        
do_sendmessage();
        break;
}    



{/
php
with

PHP Code:
{php}
Global 
$db$main_smarty$view$user$rows$page_size$offset;

switch (
$view) {
    case 
'history':
        
do_history();
        
do_pages($rows$page_size);        
        break;
    case 
'published':
        
do_published();
        
do_pages($rows$page_size); 
        break;
    case 
'shaken':
        
do_shaken();
        
do_pages($rows$page_size);
        break;
    case 
'profile':
        default:
        break;
    
    case 
'removefriend':
        
do_removefriend();
        break;
    case 
'addfriend':
        
do_addfriend();
        break;

    case 
'viewfriends':
        
do_viewfriends();
        break;

    case 
'viewfriends2':
        
do_viewfriends2();
        break;

    case 
'sendmessage':
        
do_sendmessage();
        break;
}    



{/
php
Reply With Quote
The Following User Says Thank You to kbeeveer46 For This Useful Post:
Reply

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
Fixes to Profile Extra Fields Module v0.2 and Extended Profile Module v0.1 redwine Modification Tutorials 3 10-18-2008 10:28 AM
Newline ability needed for a field in user profile rossoonline General Help 0 09-18-2007 06:23 PM
Tabbed Menu and Profile!!! Just about done... Genghis General Help 1 05-11-2007 03:43 AM
How can I add new fields to user profile gragland General Help 0 07-18-2006 12:03 AM
[bug fix] add pagination to user profile gragland Bug Report 3 07-08-2006 09:33 AM


Search Engine Friendly URLs by vBSEO 3.2.0