Announcement

#1 2020-10-28 12:40:39

piwent
Member
2020-10-24
92

Adding text to the top of the homepage

Hello,

I must be missing something obvious.

I'm trying to get some text displayed at the top of my gallery's home page. Currently the home page is displaying a list of my albums. Equivalent to /index.php?/categories.

I thought I would use the PWG Stufs plugin and create a block. The only block I can see to add text is is the Personal Block. This personal block actually does exactly what I want. However it only shows up when I'm logged in as me. Other people don't see it.

I have also installed the Additional Pages plugin, but I can't see how to create a new home page that would show the list of albums as they are now.

I'm using the Modus theme.

Surely there must be an easy (or even complicated!) way to do this.

Thanks!


    Piwigo 2.10.2 Check for upgrade
    Operating system: Linux
    PHP: 7.2.34 (Show info) [2020-10-28 04:32:59]
    MySQL: 5.7.28-log [2020-10-28 04:32:59]
    Graphics Library: ImageMagick 6.9.7-4

Last edited by piwent (2020-10-28 12:41:24)

Offline

 

#2 2020-10-29 15:15:17

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Adding text to the top of the homepage

There are several ways, none really very good and some using plugins.

You can choose to have a "0" (parent) album in which you have all the albums, thus you can edit the 0 albums description and it will show up if you have the 0 album as parent to all the other ones.

There is a block plugin https://piwigo.org/ext/extension_view.php?eid=190 you can use to do place a block and use it to place text. Some other fun functions in there as well.

The Header manager https://piwigo.org/ext/extension_view.php?eid=608  can allow you to select image or image with text as the header, but it is not very nice either way.

Then you may have some Theme options but you will rarely see anything asking you "do you want some header text here..."

Personally I find it hard to add text elemants without resorting to code and tags and frankly, I rather not, since this is not 1984 after all. If its not in a plugin or the user interface I am very reluctant to use it.

Last edited by homdax (2020-10-29 15:18:49)

Offline

 

#3 2020-10-29 15:26:06

piwent
Member
2020-10-24
92

Re: Adding text to the top of the homepage

@homdax Thanks for all that. You are right, none of them seem like a good option. To me it seems so obvious that one would want to be able to do this.

homdax wrote:

There is a block plugin https://piwigo.org/ext/extension_view.php?eid=190 you can use to do place a block and use it to place text. Some other fun functions in there as well.

So that's the plugin that I mentioned in my op. The only text block it has is personal. So it only shows up on my user. Really odd. I'm hoping I'm missing something and someone will tell me how to do it so all users can see.

I'd be willing to hard code it into the theme if I had to. But I guess I would need to set up a child theme. Is that even a thing?

Offline

 

#4 2020-10-29 18:27:31

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Adding text to the top of the homepage

The block shows for everyone if you want it to, you don't need to check any of the Authorization management checkboxes, which I think handles that...

Admittedly I could be missing something, but if you look at the site where I use it, you will see the centered header yellow text only on the front page and nowhere else...as guest.

The other albums have introduction texts per album. https://www.homeworldshots.net/

HOWEVER, I do not recommend any coding, it might jeopardize further Piwigo updates. Only do it if you can keep proper track of it and document it so you know what might break... all I did was implement a few CSS lines for text formatting and that is done within the input fields of the text since it takes html.

As you, I am rather frustrated with the lack of text support that is not linked to the images themselves, but I guess if we would like to see more of that we would perhaps have to take the step over to WordPress and other bigger publicarion platforms and while I do have WP sites, the moneygrabbing and advertisement spam inside the administration of a WP site is equally annoying.

Adding to that a blog feature to add history and background to the imagesalbum and site outside the scope of the image itself, like Evile Blog, is no longer supported, but again, I will not risk adding custom code or snippets to handle this for reasons given above.

I made an album for news lacking anything else,... https://www.homeworldshots.net/index.ph … lease-read it is a really BAD solution, and I guess I could mess a bit more with the  CSS, but it is all i could come up with, despite asking here a number of times over the years....

Last edited by homdax (2020-10-29 18:36:02)

Offline

 

#5 2020-10-29 18:53:35

executive
Member
2017-08-16
1099

Re: Adding text to the top of the homepage

I'm just going to throw my two cents in here.

Any good web designer will eventually have to get his hands dirty and dive into coding. That is, If he wants a truly unique and professional non-cookiecutter look. Fortunately PHP, Smarty templates, and CSS are relatively easy to learn.

Also don't be afraid to customize Piwigo. Most Piwigo users here who have created really sharp looking galleries, or worked on developing plugins, HAD to add custom code. Don't worry about jeopardizing Piwigo. Use [extension by Piwigo Team] LocalFiles Editor to add your own customization. That way your changes won't be obliterated by updates, and you can easily switch them on/off for troubleshooting. Custom plugins can also be enabled/disabled. You would have to try *really* hard (and not keep backups) to screw up your gallery permanently.

Customization is how Piwigo grows. If nobody touches code as homdax suggests, then the changes he wants will never come.

Last edited by executive (2020-10-29 18:55:48)

Offline

 

#6 2020-10-29 19:05:27

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Adding text to the top of the homepage

Creating a plugin would be the way to go. And keep it updated.

I have put together dozens of web sites in as many systems in my 30 years on the Internet to know that if you change core code you better be ready for issues if you are not prepared. I do not recommend it to anyone.

Having said that what they might do anyway is a completely different story and with my experience I have been in hundreds of similar discussions and the only way out with some integrity is to let people decide for themselves, but warn them and have them read up on what may or may not happen and how to avoid issues as much as possible.

Offline

 

#7 2020-10-29 19:26:58

executive
Member
2017-08-16
1099

Re: Adding text to the top of the homepage

no pain, no gain

Offline

 

#8 2020-10-30 01:47:50

piwent
Member
2020-10-24
92

Re: Adding text to the top of the homepage

homdax wrote:

The block shows for everyone if you want it to, you don't need to check any of the Authorization management checkboxes, which I think handles that...
Admittedly I could be missing something, but if you look at the site where I use it, you will see the centered header yellow text only on the front page and nowhere else...as guest.

Great. I can see the yellow text. So clearly I am doing something wrong with the plugin. I will start a new thread about this plugin feature specifically. Thanks! (Great site, btw)

I want to back up and clarify that I didn't mean to criticize Piwigo or all the people who have worked hard in big and small ways to make it easy to do 99% of what I want to do.

I also appreciate all the feedback in this thread.

Thanks!

Offline

 

#9 2020-10-30 03:27:25

piwent
Member
2020-10-24
92

Re: Adding text to the top of the homepage

OK!! I figured out what I was missing. It was kind of obvious, but not really.

I was able to get PWG Stuffs plugin to show the Personal block to anyone.

Under Configuration, there is only one section called "Activate authorization management". I assumed incorrectly that this somehow gave people authorization to do something, not to see something. What it really means is "Allow control of block visibility based on the following factors."

In my defense, once I did activate the "By User Type," it still didn't work. I had to delete my block and recreate it (twice!) before it finally displayed. But eventually it did work.

So my $.02: This is a backwards way to make the block work. If there is a visibility feature, then why not have a block that defaulted to showing to everyone and then restricted it? Anyway, I appreciate the plugin more now that I know how to use it!

Thanks everyone.

[btw, it was this thread that clued me in to how the plugin worked, https://piwigo.org/forum/viewtopic.php?id=26728]

Last edited by piwent (2020-10-30 03:47:03)

Offline

 

#10 2020-10-30 08:56:16

homdax
Member
Skåne, Sweden
2015-02-02
225

Re: Adding text to the top of the homepage

Happy it worked out for you... :)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact