Search found 16 matches
- Wed Apr 24, 2024 4:50 pm
- Forum: General
- Topic: Why not write a forum script?
- Replies: 3
- Views: 861
Re: Why not write a forum script?
Hi agg1401,
You have https://www.humhub.com/en/download. it's a open source social network.
Maybe that's helpfull.
Have a nice day!
Misteric
You have https://www.humhub.com/en/download. it's a open source social network.
Maybe that's helpfull.
Have a nice day!
Misteric
- Mon Apr 15, 2024 8:26 pm
- Forum: General
- Topic: Handling calendar / date in pages?
- Replies: 4
- Views: 466
Re: Handling calendar / date in pages?
Kristian You have the creation date and the Modified day: with an if statement like this: <?php $date = $page->date(); if(isset($page->dateModified())) { $date = $page->dateModified(); } if(strtotime($date) > strtotime(date("2024-10-31 23:59:59"))) { echo timeBetween(strtotime($date), strt...
- Tue Apr 09, 2024 3:37 pm
- Forum: General
- Topic: Handling calendar / date in pages?
- Replies: 4
- Views: 466
Re: Handling calendar / date in pages?
Hi Kristian, To show how many minutes and days are past, you can use the php-code below: <?php function timeBetween($start_date,$end_date) { $diff = $end_date-$start_date; $seconds = 0; $hours = 0; $minutes = 0; if($diff % 86400 <= 0){$days = $diff / 86400;} // 86,400 seconds in a day if($diff % 864...
- Sun Mar 24, 2024 4:16 pm
- Forum: General
- Topic: Custom fields on parent page
- Replies: 2
- Views: 1913
Re: Custom fields on parent page
Hi Bayerberg, 1. List all the pages. 2. Check first if it's a parent page. 3. Afterwards you check if it has a custom field... You can do something like that: <?php // Page number of the paginator, the first page is 1 $pageNumber = 1; // The value -1 tell to Bludit to returns all the pages on the sy...
- Thu Dec 07, 2023 7:06 pm
- Forum: Themes
- Topic: static pages and secondary pages
- Replies: 1
- Views: 17968
Re: static pages and secondary pages
Hi GutoCamargo,
You can find some information in the bludit's docs:
https://docs.bludit.com/en/dev-snippets ... d-subpages
If you don't find what you looking for, let's know!
No thanks,
Misteric
You can find some information in the bludit's docs:
https://docs.bludit.com/en/dev-snippets ... d-subpages
If you don't find what you looking for, let's know!
No thanks,
Misteric
- Tue Sep 12, 2023 2:19 pm
- Forum: Languages
- Topic: Translate Formatted Strings
- Replies: 2
- Views: 5427
Re: Translate Formatted Strings
You can use some php functions:
- strstr() (case sensitive),
- stristr() (case insenstive),
Put it into an IF statement, like this:
- strstr() (case sensitive),
- stristr() (case insenstive),
Put it into an IF statement, like this:
Code: Select all
if (strstr( $L->get( 'String with %s a function' ), '%s')) {
// do something
}
- Thu Aug 31, 2023 11:35 am
- Forum: General
- Topic: Customize automatic title generation?
- Replies: 4
- Views: 10905
Re: Customize automatic title generation?
Hi Kristian,
When a post is (auto)saved, add a timestamp before the title in the files:
bludit/bl-kernel/admin/views/new-content.php
bludit/bl-kernel/admin/views/edit-content.php ( I don't know if this is necessary )
When a post is (auto)saved, add a timestamp before the title in the files:
bludit/bl-kernel/admin/views/new-content.php
bludit/bl-kernel/admin/views/edit-content.php ( I don't know if this is necessary )
- Thu Aug 31, 2023 11:13 am
- Forum: General
- Topic: Display all uploaded images (regardless of parent post) in a gallery?
- Replies: 1
- Views: 1939
Re: Display all uploaded images (regardless of parent post) in a gallery?
Hi Kristian, You can use the php GLOB or SCANDIR function, like this: <?php $dir = "../*.png"; // upload folder to list png files foreach (glob($dir) as $filename) { echo $filename . "\n"; }?> <?php $dir = "/images/"; $files = scandir($dir); ?> Kind regards, Misteric
- Mon Jul 10, 2023 7:49 am
- Forum: General
- Topic: Bludit v4 - Alpha version
- Replies: 32
- Views: 261314
Re: Bludit v4 - Alpha version
Hi there, Will there be numbers in between the previous and next buttons for the list item page? And is autofocus username on the login page still missing? Misteric Code myself a script: <?php if(!isset($_GET['page'])){ $getPage = 1; } else { $getPage = $_GET['page']; } ?> <ul class="list-grou...
- Sun Jul 09, 2023 10:01 am
- Forum: Themes
- Topic: [SOLVED] Pagination
- Replies: 6
- Views: 19266
Re: [SOLVED] Pagination
A pagination script with numbers, first and last button: <?php if(!isset($_GET['page'])){ $getPage = 1; } else { $getPage = $_GET['page']; } ?> <ul class="list-group flex-md-row"> <?php if($getPage != 1) { ?> <li class="list-group-item"> <a class="btn btn-dark" href=&qu...