[ABD] Custom Code

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

I have been using this from day one. I couldn't live without it. I have audio played to a banned account and set my footer items with this code. I'm scared to update though as I don't want anything to break. I do use parameter template vars I think it's called as well.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] Custom Code

Post by martti »

John connor wrote: Mon Jun 11, 2018 9:14 pm I have been using this from day one. I couldn't live without it. I have audio played to a banned account and set my footer items with this code. I'm scared to update though as I don't want anything to break. I do use parameter template vars I think it's called as well.
So you're still on phpBB 3.1.5 ?

It's easy to replace those parameter template vars.
Just search for
CUSTOMCODE_PARAM_
and replace with
marttiphpbb_customcode.query.
Then turn the PARAMETERNAME to lowercase parametername.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

No, I'm on 3.2.2 and just use the extension in my FTP. It has no GUI in the Extensions tab. I modify the code manually through the FTP. However, I'm very code stupid so I have no idea what you just said there. You were the one to help me use my footer and banned audio code. The banned audio code apparently needed that parameter template code extension.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] Custom Code

Post by martti »

John connor wrote: Mon Jun 11, 2018 9:45 pm No, I'm on 3.2.2 and just use the extension in my FTP. It has no GUI in the Extensions tab. I modify the code manually through the FTP. However, I'm very code stupid so I have no idea what you just said there. You were the one to help me use my footer and banned audio code. The banned audio code apparently needed that parameter template code extension.
Ok, so you are not using this extension because version pre-2.0.0 dioesn't work together with phpBB 3.1.6+.
Probably you are using an empty extension where you manually create the files for the events. And you are using also the Parameter Template Variables extension.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

Yeah, I think if I can remember right now that the extension didn't work back then and I reverted back to what you had before in the beginning. That is, it's an extension so to speak that I enabled in the ACP, but I have to edit the files manually in the FTP under marttiphpbb/inserttemplatecode/styles/all/template/event.

In there are the 12 HTML files I can add code to.

How would I proceed to update to your latest without losing my code now?

I have to thank you, Martii for creating this extension. It's been fantastic thus far and I have to thank you for the code help as I'm very code stupid. :lol: I once had random audio play on my index which was pretty cool. But I got rid of that since I thought it would be annoying to my visitors. I do have audio that plays to banned accounts though.

I also use your paramtempvars I think it is that allows me to hide the contact bubbles from guest viewing, and thus far it works great. I couldn't have done it without you.


To make it easier, this is what I'm using.

Image
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

Okay, this might help you out. I'm using version 0.1.0. Yeah, quite old indeed, but it works.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] Custom Code

Post by martti »

The advantage of "Custom Code" is that you can edit in the ACP. But the disadvantage is that it has only 12 template events:
  • forumlist_body_category_header_before.html
  • overall_footer_after.html
  • overall_footer_body_after.html
  • overall_footer_copyright_append.html
  • overall_footer_page_body_after.html
  • overall_header_body_before.html
  • overall_header_content_before.html
  • overall_header_head_append.html
  • overall_header_page_body_before.html
  • overall_header_stylesheets_after.html
  • topiclist_row_append.html
  • viewtopic_body_postrow_post_after.html
If you do things manually, like you do now, you can chose any of the phpBB template events.
So it's up to you what you like to use. You could of course stay with the solution that you have now. If it works, why not? Or, you could also enable Custom Code, and move stuff there (gradually). But in any case, just backup the files before you do anything. Also note that this new version of Custom Code is fresh and needs testing. Quite a lot has changed internally.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

martti wrote: Tue Jun 12, 2018 10:14 pm Also note that this new version of Custom Code is fresh and needs testing. Quite a lot has changed internally.
Ah, and that's where I'll wait. So far what I have now works great.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] Custom Code

Post by martti »

The plan for this "Custom Code" extension from version 3+ is to support ALL template events present in Prosilver. A new (not required) dependency will be (a future version of) the Show phpBB Events extension (only to be enabled during editing of template code inserts).
roepertje
Registered User
Posts: 8
Joined: Sun Apr 09, 2006 11:12 am

Re: [3.2][BETA] Custom Code

Post by roepertje »

I installed and enabled Group Template Variables and Custom Code

How to
hide avatar for guest and members without an avatar
and
show avatar for members in group 9 "members with avatar"

What I did so far:

Events:
viewtopic_body_avatar_before and viewtopic_body_avatar_after
memberlist_view_content_prepend and memberlist_view_rank_avatar_before

I added above events to customcode_directory.php

I created html files in styles/all/template/event and changed the event-name and changed the name of the file. (copy from overall_header_content_before.html)

In the ACP:

viewtopic_body_avatar_before:
{%- if marttiphpbb_grouptempvars.9 -%}

viewtopic_body_avatar_AFTER
{%- endif -%}

It does not work. Maybe I misunderstood something?
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][BETA] Custom Code

Post by martti »

roepertje wrote: Wed Feb 13, 2019 1:51 pm I installed and enabled Group Template Variables and Custom Code

How to
hide avatar for guest and members without an avatar
and
show avatar for members in group 9 "members with avatar"

What I did so far:

Events:
viewtopic_body_avatar_before and viewtopic_body_avatar_after
memberlist_view_content_prepend and memberlist_view_rank_avatar_before

I added above events to customcode_directory.php

I created html files in styles/all/template/event and changed the event-name and changed the name of the file. (copy from overall_header_content_before.html)

In the ACP:

viewtopic_body_avatar_before:
{%- if marttiphpbb_grouptempvars.9 -%}

viewtopic_body_avatar_AFTER
{%- endif -%}

It does not work. Maybe I misunderstood something?
These template events are not yet supported. Only these at the moment:
  • forumlist_body_category_header_before.html
  • overall_footer_after.html
  • overall_footer_body_after.html
  • overall_footer_copyright_append.html
  • overall_footer_page_body_after.html
  • overall_header_body_before.html
  • overall_header_content_before.html
  • overall_header_head_append.html
  • overall_header_page_body_before.html
  • overall_header_stylesheets_after.html
  • topiclist_row_append.html
  • viewtopic_body_postrow_post_after.html
User avatar
Galixte de EzCom
Registered User
Posts: 1106
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: [3.2][BETA] Custom Code

Post by Galixte de EzCom »

I explain to add new event here: http://www.ezcom-fr.com/viewtopic.php?p=1501#p1501. You can translate my post by using the “Traduire en” menu to select “ENGLISH” then by clicking on the “Traduire en” link.
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.2.x & 3.3.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.
roepertje
Registered User
Posts: 8
Joined: Sun Apr 09, 2006 11:12 am

Re: [3.2][BETA] Custom Code

Post by roepertje »

Galixte de EzCom wrote: Wed Feb 13, 2019 4:44 pm I explain to add new event here: http://www.ezcom-fr.com/viewtopic.php?p=1501#p1501. You can translate my post by using the “Traduire en” menu to select “ENGLISH” then by clicking on the “Traduire en” link.
I followed exactly your tutorial, but my code seems not to work for groups.
User avatar
Galixte de EzCom
Registered User
Posts: 1106
Joined: Mon Oct 04, 2004 11:14 pm
Location: France
Name: Raphaël M.
Contact:

Re: [3.2][BETA] Custom Code

Post by Galixte de EzCom »

Now it’s concerns this topic: viewtopic.php?f=456&t=2325391 to explain your issue. ;)
Communau EzCom
📖 « Traductions d’extensions & styles pour phpBB 3.2.x & 3.3.x ».
📋 Lists of all extensions identified for phpBB 3.1.x & 3.2.x.
📋 Lists of all styles identified for phpBB 3.1.x & 3.2.x.
Image Tu as un forum et tu veux aussi un site web ? Regarde par ici.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: [3.2][BETA] Custom Code

Post by 2600 »

Question: I rely on this extension right now for a lot of things. When phpBB updates to version 4, do you think this extension will still work? I have added a lot of footer stuff and I'd like to keep it there. Then during Christmas I have code on the index that randomly plays a Christmas audio clip.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
Locked

Return to “Abandoned Extensions”