[3.2][BETA] Custom Code

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
martti
Registered User
Posts: 749
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti » Tue Mar 01, 2016 10:38 am

tony kiteboarder wrote:Thanks for your reply.
I tried what you suggested, I wanted it in overall_header_navbar_before
so i created a file with that name (.html) and added the code above, but it just displays the code?
I guess I'm missing something!

Many thanks

Tony
Normally it should work. Your code is inside <code> tags or something?

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 11:24 am

Its just displaying the code, I cant try anything until later, but maybe chnaging this would work

so now I have

Code: Select all

<!--/*
  *
  * Revive Adserver Asynchronous JS Tag
  * - Generated with Revive Adserver v3.2.1
  *
  */-->

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>
move to this...

Code: Select all

<!--/*
  *
  * Revive Adserver Asynchronous JS Tag
  * - Generated with Revive Adserver v3.2.1
  *
  *

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>/-->
its now all inside

Code: Select all

<!--/ ............/-->
Many thanks

Tony

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 11:30 am

may be better to use the local mode code

Code: Select all

<?php
  //<!--/*
  *
  * Revive Adserver Local Mode Tag
  * - Generated with Revive Adserver v3.2.1
  *
  */-->

  // The MAX_PATH below should point to the base of your Revive Adserver installation
  define('MAX_PATH', '/var/www/vhosts/kiteboarder.co.uk/httpdocs/revive');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    // function view_local($what, $zoneid=0, $campaignid=0, $bannerid=0, $target='', $source='', $withtext='', $context='', $charset='')
    $phpAds_raw = view_local('', 1, 0, 0, '', '', '0', $phpAds_context, '');
  }
  echo $phpAds_raw['html'];
?>

User avatar
martti
Registered User
Posts: 749
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti » Tue Mar 01, 2016 11:33 am

The code should certainly not be inside a html comment. You can leave out the comment alltogether. So the inserted code becomes:

Code: Select all

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>

User avatar
cece74
Registered User
Posts: 498
Joined: Mon Jan 12, 2015 8:55 pm

Re: [RC] Custom Code

Post by cece74 » Tue Mar 01, 2016 2:59 pm

No works for 3.1.8?
thanks

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 6:02 pm

martti wrote:The code should certainly not be inside a html comment. You can leave out the comment alltogether. So the inserted code becomes:

Code: Select all

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>
Its not working1 The process is working as the text is showing up after I purge the cache

can be seen on my forum

http://www.kiteboarder.co.uk/kitesurfing/index.php

Many thanks

Tony

User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: [RC] Custom Code

Post by Solidjeuh » Tue Mar 01, 2016 6:15 pm

I tried this, and added the code to overall_footer
And don't see the code, so I guess it works, you must be doing something wrong
I don't suffer from insanity. I enjoy every minute of it.

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 6:19 pm

Did you see an image?

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 6:36 pm

its very frustrating!
I was running 3.1.5 since last year and had several banners running on the site using custom code
So I installed another 3.1.5 board so I could reuse the custom code ext and now thats not working either. Trying to retrace my steps, but failing at that as well
Upgrading to 3.1.8 at weekend has kicked my arse!

Many thanks

Tony

tony kiteboarder
Registered User
Posts: 32
Joined: Sat Feb 27, 2016 11:37 am

Re: [RC] Custom Code

Post by tony kiteboarder » Tue Mar 01, 2016 7:47 pm

Hi

I'm doing something very wrong here!
I just tested using the "Use case: Message on the contact page" example shown on the first page of this thread
Tried it on a 3.1.5 board (which Im running to test the old custom code extension) and used insert template code and it doesn't work, nothing showing
Tried it in 3.1.8 and I can see the text in the .html file
I'm editing the files on a mac in text edit and it asks me if I want to overwrite the formatting, so not sure if I'm screwing something up as it just looks like a regular text file
Really can't think of anything else so going for a pint of fine lager at my local pub

Many thanks

Tony

User avatar
martti
Registered User
Posts: 749
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti » Tue Mar 01, 2016 9:44 pm

You just need to use a plain text editor. Not something that converts your text into a html page.

http://stackoverflow.com/questions/6758 ... eb-browser

This is what your inserted text looks like at the moment:

Code: Select all

		<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1404.11">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 12.0px Monaco; color: #2f8b57; -webkit-text-stroke: #2f8b57}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 12.0px Monaco; color: #2f8b57; -webkit-text-stroke: #2f8b57; min-height: 16.0px}
    span.s1 {font-kerning: none}
  </style>
</head>
<body>
<p class="p1"><span class="s1"><ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins></span></p>
<p class="p1"><span class="s1"><script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script></span></p>
<p class="p1"><span class="s1"><!--/*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>* Revive Adserver Asynchronous JS Tag</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>* - Generated with Revive Adserver v3.2.1</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*/--></span></p>
<p class="p1"><span class="s1"><br>
</span></p>
<p class="p1"><span class="s1"><ins data-revive-zoneid="7" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins></span></p>
<p class="p1"><span class="s1"><script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script></span></p>
<p class="p2"><span class="s1"></span><br></p>
</body>
</html>

User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: [RC] Custom Code

Post by Solidjeuh » Tue Mar 01, 2016 9:53 pm

I installed WINE on my linux server. I can open windows software like notepad++ with that.
Or you can try some alternatives: http://formac.informer.com/notepad
I don't suffer from insanity. I enjoy every minute of it.

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Custom Code

Post by GoBieN » Tue Mar 01, 2016 10:17 pm

Leave it to Apple software to try to know better than what the user wants.

rrbailey89
Registered User
Posts: 248
Joined: Fri Oct 24, 2014 3:00 pm

Re: [RC] Custom Code

Post by rrbailey89 » Sat Mar 05, 2016 11:55 am

Wow I thought this extension was gone.. I was sad. Is it working with 3.1.7 and up now?

User avatar
Puchahawa
Registered User
Posts: 768
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Custom Code

Post by Puchahawa » Sat Mar 05, 2016 6:27 pm

No, Custom Code isn't working on 3.1.7 or 8. Check out martti's post on page 38 for a work around so you can continue to use the functionality. :)
Avatar courtesy of artist Faith Coyotë

Post Reply

Return to “Extensions in Development”