1
heyula
PodTalk Theme (PUBLISHER)
  • 2024/11/2 12:20

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


"Recently, thanks to an idea Michael came up with for the Publisher module, creating independent blocks has become much easier, and I wanted to test it with a nice theme. Very soon, I will release the PodTalk theme compatible with Publisher."

Resized Image


Demo: https://erenyumak.com/ato/

Code added by Michael to theme_autorun.php


/** @var XoopsTpl */
global $xoopsTpl;
if (!empty(
$xoopsTpl)) {
    
$xoopsTpl->addConfigDir(__DIR__);
}

require 
dirname(__DIR__,2) . '/modules/publisher/preloads/autoloader.php';

use 
XoopsModulesPublisher{
    
Constants,
    
Helper,
    
Item
};

// Initialize helper and text sanitizer
$myts MyTextSanitizer::getInstance();

/**
 * Function to fetch items
 */
function getPublisherItems($limit$sort 'RAND()'$order '')
{
    
$helper Helper::getInstance();
    
$itemsObj $helper->getHandler('Item')->getItems(
        
$limit,
        
$start 0,
        [
Constants::PUBLISHER_STATUS_PUBLISHED],
        -
1,
        
$sort,
        
$order,
        
'',
        
true,
        
$criteria null
    
);

    
$items = [];
    if (
$itemsObj) {
        foreach (
$itemsObj as $itemObj) {
            
$newItem = [
                
'itemid'   => $itemObj->itemid(),
                
'title'    => $itemObj->title(),
                
'body'     => $itemObj->body(),
                
'votes'    => $itemObj->votes(),
                
'counter'  => $itemObj->counter(),
                
'comments' => $itemObj->comments(),
                
'image'    => XOOPS_URL '/uploads/blank.gif',
            ];

            
$images $itemObj->getImages();
            if (isset(
$images['main']) && is_object($images['main'])) {
                
$newItem['image'] = XOOPS_URL '/uploads/' $images['main']->getVar('image_name');
            }

            
$items[] = $newItem;
        }
    }
    return 
$items;
}

// Fetch and assign items for each template
$xoopsTpl->assign('breakingItems'getPublisherItems(4));
$xoopsTpl->assign('featuredItems'getPublisherItems(3));
$xoopsTpl->assign('fourLastedRandomItems'getPublisherItems(4));
$xoopsTpl->assign('itemBreakingItems'getPublisherItems(10));
$xoopsTpl->assign('lastedRandomItems'getPublisherItems(4));
$xoopsTpl->assign('newsItems'getPublisherItems(4));
$xoopsTpl->assign('oneLastedRandomItem'getPublisherItems(1));
$xoopsTpl->assign('rightLastedRandomItems'getPublisherItems(8));
$xoopsTpl->assign('sliderItems'getPublisherItems(9));

// Assign XOOPS URL
$xoopsTpl->assign('xoops_url'XOOPS_URL);


Example block usage

<{foreach item=item from=$sliderItems}>    
    <
div class="owl-carousel-info-wrap item">
        <
img src="<{$item.image}>"
            
class="owl-carousel-image img-fluid" alt="<{$item.title}>">

        <
div class="owl-carousel-info">
            <
h4 class="mb-2">
                <
a href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$item.itemid}>">
                    <{
$item.title|truncate:15}>
                a>            
                <
img src="<{xoImgUrl}>images/verified.png" class="owl-carousel-verified-image img-fluid" alt="<{$item.title}>">
            h4>

            <
span class="badge">Reads: <{$item.counter}>span>

            <
span class="badge">Votes: <{$item.votes}>span>
        div>
    div>
<{/foreach}>



2
heyula
Re: wgFilemanager released for testing and contribution
  • 2024/8/21 15:19

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


Great module. I will try it as soon as possible. Thank you.



3
heyula
Re: New Admin Theme for XOOPS
  • 2024/5/29 18:56

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


Quote:

Mamba wrote:
Eren,
Quote:
First of all, thank you so much for testing and submitting your changes. I love when we get together as a community and get things going!

But this is a perfect opportunity to practice collaboration on GitHub and working with Git.

Just fork it from https://github.com/ForXoops/System, and then submit your changes there! Trust me, it will speed up the development process for all, and it will also help with testing for bugs!

If you need any help with how to work with GitHub and local forks, please let me know, and I'll be happy to help!


Resized Image


These updates are valid in "cpadmin" made by ForMusS. The reason is that "cpadmin" supports bootstrap 4 and I adapted "moduleadmin.php" for bootstrap 4.



4
heyula
Re: New Admin Theme for XOOPS
  • 2024/5/29 14:25

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


The theme is very nice, but the module class needs to be updated for module appearances.

I worked on it a bit, and the result is as follows:

Old version
Resized Image


New version
Resized Image


Download:

https://erenyumak.com/Xoops-Admin.zip



5
heyula
Re: New Admin Theme for XOOPS
  • 2024/5/29 6:45

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


Separating the system options and the module options with a dash seems like a better idea.

Example:

Resized Image


Resized Image



6
heyula
Re: New Admin Theme for XOOPS
  • 2024/5/28 20:45

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


This is really great. I will try it as soon as possible and get back to you.
Thank you.



7
heyula
Re: publisher 1.08
  • 2023/6/24 13:15

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


I think the Publisher module is Xoops itself. Errors in the blocks are fixed simply, but the important thing is that there is a section in the publisher where we can add additional fields.



8
heyula
Re: Update site
  • 2023/6/24 13:12

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


You will get php version error in all modules you use on the site. Most modules on chlmz.com will not work in Xoops 2.5.11



9
heyula
Re: survey
  • 2023/6/24 13:08

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


You can try..

# Adding a category
RewriteRule ^publisher-([a-z-]+)/?$ modules/publisher/category.php?categoryid=$[L]



10
heyula
Re: how to change newbb photo width?
  • 2023/6/9 11:41

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


You can adjust the height with css.

Example code:

.res img {
    
floatleft;
    
border2px solid #e5e9f2;
    
width255px;
    
height190px;
    
margin-right5px;
}


or

class/textsanitizer/image/config.php

return $config = array(
    
// Click to open an image in a new window in full size using CaricaFoto
    
'clickable' => 1,
    
// Resize the image down to max_width set below
    
'resize'    => 1,
    
// Maximum width of an image displayed on page, otherwise it will be resized
    
'max_width' => 300);




TopTop
(1) 2 3 4 ... 24 »



Login

Who's Online

147 user(s) are online (89 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: May 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits