1641
alain01
Re: Customize blocs with no title in the managment page
  • 2020/1/13 23:50

  • alain01

  • Just can't stay away

  • Posts: 530

  • Since: 2003/6/20


Quote:
This would allow switching themes without resulting in a bunch of "@ - " block titles

For sure,
if we can centralize the need rather than directing it towards the theme, it is more effective.

The best answer for me (but i know the response) it's to add a label field, independant from the title, just here to manage block in the management page, but we need to add a field in the database.

In fact, these 2 proposals are good for me.



1642
safeinsanity
Updating older xoops 2 themes

Can anybody point me in the right direction as where I would look in the files/code to fix how the main menu and the user menu on the old xoops themes don't display the links correctly in the blocks. You know how they are all over the place instead of being neatly displayed on their own line. (link under link) like they should display ?

I found a few old themes that I really like as they remind me of using xoops back in the old days.



1643
safeinsanity
Re: Getting a "403 Access denied" error when trying to access the Private Messages module

Quote:

geekwright wrote:
A 403 status is not something XOOPS itself would generate directly.

Some thoughts:
- check for a .htaccess file in the modules/pm/ directory
- make sure permissions for the modules/pm/ directory are set to allow access by the web server
- if using a SELINUX enable server double check the security context for the directory


No htaccess file in pm module's directory
Permissions on pm module seem ok - mosty 755 and I made a few 777
NOt surre about the server because my site is hosted on a free web hosting site.

I really wish that I could get this working though.



1644
geekwright
Re: Customize blocs with no title in the managment page

This is a common problem, I know I have this issue. Perhaps, it would be best if it is handled outside of the theme in core?

I would suggest we treat a block title starting with "// " (slash, slash, space) as a comment, and suppress the title when the block is rendered.

This would allow switching themes without resulting in a bunch of "@ - " block titles

The "//" is a comment indicator in many languages (such as PHP, C, JAVA, JavaScript to name a few) so it could be semantically familiar for some.

What do you think?



1645
alain01
Re: Customize blocs with no title in the managment page
  • 2020/1/12 23:36

  • alain01

  • Just can't stay away

  • Posts: 530

  • Since: 2003/6/20


ok,
$block.block_type is unknown by the system.

Ok i tried to find another solution.

All my customize title blocs start with "@ - "

Then in tpl file, I modified the code

<{if $block.title}><h4><{$block.title}>h4><{/if}>

by

<{if ($block.title|truncate:4:"":true)!="@ - "}><h4><{$block.title}>h4><{/if}>
And it works !!!

Title customize bloc examples :
- "My personnal title bloc" => The title is displayed
- "@ - My personnal title bloc" => The title is not displayed

It's a fine code, no ?



1646
alain01
Customize blocs with no title in the managment page
  • 2020/1/12 21:12

  • alain01

  • Just can't stay away

  • Posts: 530

  • Since: 2003/6/20


Hello,
1 problem but may be 2 solutions.

All my customize blocks dont used title.
it's easy to not put title in the field title in the /modules/system/admin.php?fct=blocksadmin&op=add page.
But when you used lot of customize block,
it's hard to manage these blocks in the /modules/system/admin.php?fct=blocksadmin page cause blocks get blank title...
I should edit the bloc to know the block.

I think about 2 solutions :

1) I put title in the title field and in theme.tpl i should add condition for customize blocks.

i have seen these exemples :
//  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 block, this 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


In database, i see 1 field named block_type where (i suppose) :
S for System
M for Module
C for Customize

So how can add code to test that it's a customize bloc ?

<{if $block.block_type!="C"}><h4><{$block.title}>h4><{/if}>
 <{
$block.content}>


I have not yet tested this code

2 - Solution 2
Hummm,
we need to add a new fied for blocks named label for example
and we can see the label field + the title field in the blocks managment (/modules/system/admin.php?fct=blocksadmin)
So the label field is just here to manage blocks without title

Please, let me go in the good way !



1647
alain01
Re: Customize Blocks and smarty variable
  • 2020/1/12 8:54

  • alain01

  • Just can't stay away

  • Posts: 530

  • Since: 2003/6/20


Haaaaa,
{X_SITEURL} !!!

Sure, thank you, it works like i want.
Quote:
I have used that to more easily move things from a development system to a production environment, without making changes.
Yes, exactly

Haaaa, shortcodes,
I remember this news, now !
I was so happy to read this very good news !
It's a very powerful and amazing new fonction !
Again 1 time, i'm unpatient to use the 2.6 version in stable and production stage...



1648
geekwright
Re: Getting a "403 Access denied" error when trying to access the Private Messages module

A 403 status is not something XOOPS itself would generate directly.

Some thoughts:
- check for a .htaccess file in the modules/pm/ directory
- make sure permissions for the modules/pm/ directory are set to allow access by the web server
- if using a SELINUX enable server double check the security context for the directory



1649
geekwright
Re: Customize Blocks and smarty variable

There is no variable processing inside custom HTML blocks. Smarty, and all of its functions, is not available.

There is one replacement that can help in any custom blocks. The code:
{X_SITEURL}
will be replaced with the XOOPS_URL with a trailing slash. You can use that to build URLs for pages or sites.

I have used that to more easily move things from a development system to a production environment, without making changes.

Long term, the next generation XOOPS has shortcodes which will be available in almost any context. That will provide a more complete and extensible solution.



1650
safeinsanity
Getting a "403 Access denied" error when trying to access the Private Messages module

Getting a "403 Access denied" error when trying to access the Private Messages module on new Xoops 2.5.10 install. Anybody know how to fix this? Everything else seems to be working fine.

When I click on the "Inbox" or "Private Messaging" links I get taken to a blank white web page that says "403 Access denied"

Configuration Check
Private Messaging module - Version : 1.14 Final
Minimum PHP required: 5.3.9 (your version is 7.3.6)
MYSQL Minimum version required: 5.0.7 (your version is 5.6.45-86.1)
Minimum XOOPS required: 2.5.10 (your version is 2.5.10)
Minimum ModuleAdmin required: 1.2 (your version is 1.2)




TopTop
« 1 ... 162 163 164 (165) 166 167 168 ... 29425 »



Login

Who's Online

256 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 256


more...

Donat-O-Meter

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

Latest GitHub Commits