How to add counter in the homepage(sitepage) of the right sidebar?

hey guys i want to add counter in the homepage or in the site page but
i have tried many times and icant get the php code please help me to
find the php code displayed in the right side bar and left side bar of the
home page?
note : idont need the journal page layout

Hi @melkamu

You can not add PHP code in the GUI – you will have to add it into the code. Maybe it would be enough to change a template, but even better would be to implement a plugin (e.g. a block plugin).

Best,
Bozaan

i know that my problem is missing the place where to
insert myphp code to display in the sitepage

i think you dont understand my problem

This simple language is much better to understand what you would like to do :slight_smile:
Unfortunately, the sidebar blocks on the home page of the site cannot be influenced via GUI :frowning:

i think you dont understand my question

where can i add my link for journal help?

Hmmm… Yes, I don’t understand it :frowning:
If you are looking for the code in OJS that displays the site page:
The handler is in pages/index/IndexHandler and the template in templates/index/site.tpl
The block plugins are under plugins/blocks/…
“Open Journal Systems” is in the developedBy and “Journal Help” in help block plugin.
If you would like to disable a block plugin from the site page, you will have to change it in the database in the plugins_settings table, to set enabled = 0 (instead of 1) where journal_id = 0.
If you would like to add a new block to the site page, you will have to implement a new block plugin.

Still my question is no t answered please give me your address

I give up, maybe somebody else could help…
Or maybe you could try to explain it better?

when i add new block it is displayed inside the journal or at the journal page.
but i want to display it in the homepage/site page that means when you enter url it must be displayed but when you add ablock it is not displayed in the site

How did you added the new block? – Did you implemented it or did you use the Custom Block Plugin?

yest i have created in the new system block plugin and it is displayed only in the journal page
that means it is not displayed before login?

Those blocks created with the Custom Block Plugin cannot be displayed on the site page, just on the journal page. I.e. you will have to implement a new plugin to display it on the site page or to change/manipulate the existing one. The site blocks cannot be manipulated via GUI in the system.

For example: you cannot change the blocks in the sidebar on this page: http://www.psychotherapie-wissenschaft.info/ – it is the site page containing two journals. But if you go to a journal there, e.g. http://www.psychotherapie-wissenschaft.info/index.php/psy-wis, you can add or remove the blocks in the sidebar.

ok but when i inspect i got this

but i cant get it in the wamp directory

In OJS 2.x, site level blocks can only be changed by manipulating the database directly.

You can find more information here:

1 Like

Thank you for your Help i have corrected every thing i want !