11
zivXP
Re: Output of images in the block
  • 2023/2/21 12:46

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Quote:

heyula wrote:

The version of the publisher module you are using is outdated.

You are getting this error because the classes in the older versions of the publisher are not the same as the new versions.


I am installing XOOPS Publisher 1.07 FINAL.

Do you have Publisher 1.08 Alpha running?

12
heyula
Re: Output of images in the block
  • 2023/2/21 14:52

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


Publisher 1.8.0 Alpha.8 (01/14/2022)

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

13
zivXP
Re: Output of images in the block
  • 2023/2/21 17:39

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Quote:

heyula wrote:
Publisher 1.8.0 Alpha.8 (01/14/2022)


I understand. But at the moment, the transition is undesirable.
I would like to find a solution for this version.

How to find the latest article correctly?
I think we need to create a cycle with parameters for this part of the code:

<{foreach item=item from=$block.items name=spotlight}>
<{if $item.summary != ''}>


<{if $item.image_path}>
<{$item.clean_title}>
<{/if}>


 <{$item.when}> <{$item.titlelink}>

<{$item.summary}>


<{/if}>
<{/foreach}>

14
zivXP
Re: Output of images in the block
  • 2023/2/22 9:49

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


How to make the code correctly?
to specify the last article in the block "publisher_items_spot.tpl"
<{if $item.itemurl == "<{$xoops_url}>modules/publisher/item.php?itemid=177"}>
What should I write instead of highlighted?

15
heyula
Re: Output of images in the block
  • 2023/2/24 15:15

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


You can't solve this by changing the tpl file.

publisher/blocks/items_spot.php You need to edit the php file.

16
zivXP
Re: Output of images in the block
  • 2023/2/24 16:40

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


I found a simple solution. Used 2 blocks. In the first block, I displayed an image of the last article. In the second block, I displayed articles without images.
The site is not fully ready yet, But you can see. https://jumber.ru/

17
heyula
Re: Output of images in the block
  • 2023/2/24 17:39

  • heyula

  • Theme Designer

  • Posts: 596

  • Since: 2008/4/24


If you want to use Xoops in a much more flexible way, I recommend using Blocks anywhere <{block id=x}>. @trabis quote from "Blocks anywhere" is a smarty plugin that provides an easy way to place a block in a theme or template. Just upload this smarty plugin to class/smarty/xoops_plugins folder and you will be able to add a block using the following method:
<{block id=1}>
Replace '1' by the id of the block you want to display. You can find id of block in blocks administration(or groups), just hover the mouse over block 'EDIT' link and you will see something like this: .../modules/system/admin.php?fct=blocksadmin&op=edit&bid=3 This plugin respects XOOPS permissions. It will only display the block for users that are allowed to see it(as set in groups permissions). This plugin also takes in consideration cached blocks. Version 1.1 brings you some new cool options such as: display = 'title' -> shows just title display = 'none' -> renders the block but does not display it options = 'enter|block|options' -> overwrites block default options groups = 'enter|allowed|groups' -> overwrites block default group view permissions cache = 3600 -> overwrite cache time(in seconds) Code examples:
<{block id=1 display="title"}>   displays just the block title
<{block id=1}>                   displays just the block content
<{block id=7 display="none"}>    does not display nothing but executes the blockthis can go for online block or to trigger some cron block
<{block id=600 groups="0|1" cache=20}>  display block just for this 2 groups and sets a cache of 20 seconds
<{block id=600 options="100|100|s_poweredby.gif|0"}> displays block with diferent options
Usage example: Place your 'multimenu' block in your theme. Invisible online block that updates online users table. Add an image gallery block inside article category page. Add users online block into yogurt profile page Footnote: Plugin now comes standard on current Xoops versions

18
zivXP
Re: Output of images in the block
  • 2023/2/24 18:15

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Thank you, this is very valuable information.
Block "Who's Online" - i'm making the block active for everyone now, but visible only to admin.

19
Mamba
Re: Output of images in the block
  • 2023/2/26 10:37

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Thank you Heyula for sharing this info.

I've learned today something new, so this is a good day!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

294 user(s) are online (175 user(s) are browsing Support Forums)


Members: 0


Guests: 294


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits