Welcome Guest, Not a member yet? Register   Sign In
CI 4.0.3 is releasing soon - help wanted
#11

Good job, please keep it up
Reply
#12

On the 4.0.2

Did the error corrected
Class 'Kint\Kint' not found

manual solution :

Go to System/ThirdParty/Kint, and rename the kint.php to Kint.php
Reply
#13

I may be wrong, but the impression I have is that fundamentally the framework is developed almost exclusively in the creation of blogs. Until CI3 this did not affect projects developed for another type of website as much.

I see and perceive consistent advances in CI4 over the previous version. Of course, my different goals of creating a blog lead me to different priorities, so for me, the new pagination system is, at the very least, fantastic, minimalist, yet efficient, spartan. But almost as a fright you discover that the display default of the index of the pages is vertical.
Previous
1
2
3
Next

What?!

You are forced to handle/change something that would normally not be necessary.

Likewise, the page numbering default is query parameter instead of URI segment.

I keep looking at the forum pages and they are organized inversely to the default of the framework. Obviously something is wrong.

Please, has anyone tried and managed, following the instructions in the manual, to change the page numbering mode, as shown below?

https://codeigniter.com/user_guide/libra...ation.html

"It is also possible to use a URI segment for the page number, instead of the page query parameter. Simply specify the segment number to use as the fifth parameter to makeLinks(). URIs generated by the pager would then look like https://domain.tld/model/[pageNumber] instead of https://domain.tld/model?page=[pageNumber].:

<?= $pager->makeLinks($page, $perPage, $total, 'template_name', $segment) ?>

Please note: $segment value cannot be greater than the number of URI segments plus 1."
Reply
#14

Quote:You are forced to handle/change something that would normally not be necessary.
What?!

Are you saying that you'd rather CodeIgniter force you into a specific CSS framework? If I preferred Foundation over Bootstrap, I would have to modify the CSS just to use a simple, framework agnostic, HTML list.
No thanks.   Smile



Quote:Likewise, the page numbering default is query parameter instead of URI segment.
If you need this changed, look into routing.

Untested:
PHP Code:
$routes->add('products/show/(\d+)''Products::show?page=$1'); 



Quote:I keep looking at the forum pages and they are organized inversely to the default of the framework. Obviously something is wrong.
Obviously the forum DOESN'T USE CODEIGNITER.   Smile



Quote:Please, has anyone tried and managed, following the instructions in the manual, to change the page numbering mode, as shown below?
Yes, here's mine for Bootstrap 4, located under app\Views\Pagers\bootstrap_full.php


PHP Code:
<?php
/**
 * @var \CodeIgniter\Pager\PagerRenderer $pager
 */
$pager->setSurroundCount(5); //specifies than we want to show FIVE links to either side of the current page link. The only parameter that it accepts is the number of links to show.
?>

<nav aria-label="<?= lang('Pager.pageNavigation'?>">
    <ul class="pagination pagination-sm">
        <?php if ($pager->hasPrevious()) : ?>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getFirst() ?>" aria-label="<?= lang('Pager.first'?>">
                    <span aria-hidden="true"><?= lang('Pager.first'?></span>
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getPrevious() ?>" aria-label="<?= lang('Pager.previous'?>">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
        <?php endif ?>

        <?php foreach ($pager->links() as $link) : ?>
            <li class="page-item<?= $link['active'] ? ' active' '' ?>">
                <a class="page-link" href="<?= $link['uri'?>">
                    <?= $link['title'?>
                </a>
            </li>
        <?php endforeach ?>

        <?php if ($pager->hasNext()) : ?>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getNext() ?>" aria-label="<?= lang('Pager.next'?>">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getLast() ?>" aria-label="<?= lang('Pager.last'?>">
                    <span aria-hidden="true"><?= lang('Pager.last'?></span>
                </a>
            </li>
        <?php endif ?>
    </ul>
</nav> 
Reply
#15

(04-29-2020, 08:30 AM)BilltheCat Wrote:
Quote:You are forced to handle/change something that would normally not be necessary.
What?!

Are you saying that you'd rather CodeIgniter force you into a specific CSS framework? If I preferred Foundation over Bootstrap, I would have to modify the CSS just to use a simple, framework agnostic, HTML list.
No thanks.   Smile



Quote:Likewise, the page numbering default is query parameter instead of URI segment.
If you need this changed, look into routing.

Untested:
PHP Code:
$routes->add('products/show/(\d+)''Products::show?page=$1'); 



Quote:I keep looking at the forum pages and they are organized inversely to the default of the framework. Obviously something is wrong.
Obviously the forum DOESN'T USE CODEIGNITER.   Smile



Quote:Please, has anyone tried and managed, following the instructions in the manual, to change the page numbering mode, as shown below?
Yes, here's mine for Bootstrap 4, located under app\Views\Pagers\bootstrap_full.php


PHP Code:
<?php
/**
 * @var \CodeIgniter\Pager\PagerRenderer $pager
 */
$pager->setSurroundCount(5); //specifies than we want to show FIVE links to either side of the current page link. The only parameter that it accepts is the number of links to show.
?>

<nav aria-label="<?= lang('Pager.pageNavigation'?>">
    <ul class="pagination pagination-sm">
        <?php if ($pager->hasPrevious()) : ?>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getFirst() ?>" aria-label="<?= lang('Pager.first'?>">
                    <span aria-hidden="true"><?= lang('Pager.first'?></span>
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getPrevious() ?>" aria-label="<?= lang('Pager.previous'?>">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
        <?php endif ?>

        <?php foreach ($pager->links() as $link) : ?>
            <li class="page-item<?= $link['active'] ? ' active' '' ?>">
                <a class="page-link" href="<?= $link['uri'?>">
                    <?= $link['title'?>
                </a>
            </li>
        <?php endforeach ?>

        <?php if ($pager->hasNext()) : ?>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getNext() ?>" aria-label="<?= lang('Pager.next'?>">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li class="page-item">
                <a class="page-link" href="<?= $pager->getLast() ?>" aria-label="<?= lang('Pager.last'?>">
                    <span aria-hidden="true"><?= lang('Pager.last'?></span>
                </a>
            </li>
        <?php endif ?>
    </ul>
</nav> 

Did you read my first sentence?
"I may be wrong, but the impression I have is that fundamentally the framework is developed almost exclusively in the creation of blogs."
I can almost bet that your website is a blog.
For example, the template 'default_simple': it is not 'Previous' or 'Next', but 'New' and 'Older', typical of Blogs.
Probably 99.99% of users are blog developers, but this is not and can't be an obstacle to the defense of my interests.

"Are you saying that you'd rather CodeIgniter force you into a specific CSS framework?"

No, I was just calling attention to the fact that the default template 'defaut_simple' is listed vertically, which is quite unusual, fine if you don't care about the aesthetics of your work. I worry, so ..

"Likewise, the page numbering default is query parameter instead of URI segment."

If you have read all the text you must have seen that there is an instruction in the manual to change from query to segment, but at least for me the instruction is not clear how and where.

It is a matter of thought, professional education, if it is to be done that it is done well. I am not saying that due attention was not paid to the creation of the manual, but that there is something that needs to be corrected and/or clarified.

Apparently, I can't say, but it seems to me that you believe that I'm one of those guys who keeps complaining about things, but if you had noticed a little detail, you would know that not, because I've been part of the community since 2014, unless I'm a masochistic, it is a testament to my confidence, and, above all, a great pride that over the years I have grown up with the whole community, and that it continues to grow strong and united.

"Obviously the forum DOESN'T USE CODEIGNITER."
Wrong!!! Whether the administration decided to use software to manage the forum is something else. I don't know if you see it like that, but FORUM IS THE CODEIGNITER is the only reason it exists. I believe that your website, for example, only exists because of its users.

I am an old man, 70, and I feel privileged to be able to debate with young people, I suppose, like you. Learning to learn, always.
Do not worry, I am not one of those "in my time was better", for me, the only problem with youth is that I am not part of it.
Reply
#16

Quote:"I may be wrong, but the impression I have is that fundamentally the framework is developed almost exclusively in the creation of blogs."

I can almost bet that your website is a blog.
I wouldn't say 'exclusively' in the creation of blogs.  Neither my site, nor any of the six sites I've built in various CodeIgniter versions have been blogs. 



Quote:"Are you saying that you'd rather CodeIgniter force you into a specific CSS framework?"

No, I was just calling attention to the fact that the default template 'defaut_simple' is listed vertically, which is quite unusual, fine if you don't care about the aesthetics of your work. I worry, so ..
Why do you think it's unusual?  HTML lists are very commonly used as the starting point of horizontal pagination.  Here's a few examples in different CSS frameworks, and you'll notice that each of them use an HTML (vertical) list:



Quote:"Likewise, the page numbering default is query parameter instead of URI segment."

If you have read all the text you must have seen that there is an instruction in the manual to change from query to segment, but at least for me the instruction is not clear how and where.
That's only if you're using makeLinks, and to be honest I haven't needed to try that yet.  I could be wrong, but from what you've mentioned so far, it doesn't sound like you need to either.  Just set the $pager->setSurroundCount(5) value that you need

Quote:"Obviously the forum DOESN'T USE CODEIGNITER."

Wrong!!! Whether the administration decided to use software to manage the forum is something else. 
My statement on this was simply saying that the forum software is MyBB, and does not use anything related to the CodeIgniter development framework.  Yes, it's part of the CodeIgniter website that we're viewing, but comparing the forum to the development framework is simply not valid.  Aesthetically they could make it look similar, but it is not the same product.

Quote:I am an old man, 70, and I feel privileged to be able to debate with young people, I suppose, like you. Learning to learn, always.
That's great!  My dad is 76, and he has a hard time learning new things.  I try to show him some of the work that I do, but.... he's not interested.  Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB