Search This Blog

Showing posts with label PhpBB. Show all posts
Showing posts with label PhpBB. Show all posts

Friday, 22 July 2011

Adding CoolIris embed to PhpBB

 Under the 'posting' section in the ACP.

Create a new BBCode :

BBCode :
[cooliris]http{SIMPLETEXT}://picasaweb.google.com/{INTTEXT}/{IDENTIFIER2}[/cooliris]

HTML replacement :

<script type="text/javascript"         src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
    </script>
  <div id="wall{INTTEXT}{IDENTIFIER2}">    <script>
        var flashvars = {
            feed: encodeURIComponent("api://picasaweb.google.com/?user={INTTEXT}&album={IDENTIFIER2}")
        };
        var params = {
             allowFullScreen: "true",
             allowscriptaccess: "always"
        };
        swfobject.embedSWF("http://apps.cooliris.com/embed/cooliris.swf",
            "wall{INTTEXT}{IDENTIFIER2}", "600", "450", "9.0.0", "",
            flashvars, params);
    </script>
</div>



NB// This JS code is from http://lysergo.blogspot.com/2010/05/bbcode-picasa.html.  I made two changes from the original blog post.  '#' dropped and {SIMPLETEXT} added to the BBCode.


Assuming it saves OK you can now test this by manually adding a URL between the [cooliris][/cooliris] tags.  If it all works OK you can go back to the code edit and enable the 'Display on posting page' and add a little help text.

Adding Web Picasa Slide show to PhpBB

Under the 'posting' section in the ACP.


Create a new BBCode :


BBCode :
[picasa]http{SIMPLETEXT}://picasaweb.google.com/{INTTEXT}/{IDENTIFIER2}[/picasa]


HTML replacement :


<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
</script>
<div id="piks{INTTEXT}{IDENTIFIER2}"> <script>
var flashvars = {
feed: "http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F{INTTEXT}%2Falbum%2F{IDENTIFIER2}%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US",
RGB: "0x000000"
};
var params = {
pluginspage: "http://www.macromedia.com/go/getflashplayer",
allowscriptaccess: "always"
};
swfobject.embedSWF("http://picasaweb.google.com/s/c/bin/slideshow.swf",
"piks{INTTEXT}{IDENTIFIER2}", "600", "450", "9.0.0", "",
flashvars, params);
</script>
</div>



NB// This JS code is from http://lysergo.blogspot.com/2010/05/bbcode-picasa.html.  I made two changes from the original blog post.  '#' dropped and {SIMPLETEXT} added to the BBCode.


Assuming it saves OK you can now test this by manually adding a URL between the [picasa][/picasa] tags.  If it all works OK you can go back to the code edit and enable the 'Display on posting page' and add a little help text.

Adding YouTube embed to PhpBB

Under the 'posting' section in the ACP.


Create a new BBCode :


BBCode :
[youtube]http://{SIMPLETEXT1}.youtube.com/watch?v={SIMPLETEXT2}[/youtube]


HTML replacement :
<iframe width="425" height="349" src="http://{SIMPLETEXT1}.youtube.com/embed/{SIMPLETEXT2}?rel=0" frameborder="0" allowfullscreen></iframe>



Assuming it saves OK you can now test this by manually adding a URL between the [youtube][/youtube] tags.  If it all works OK you can go back to the code edit and enable the 'Display on posting page' and add a little help text.

Sunday, 27 March 2011

PphBB 3.0.8 Upgrade

I was two versions behind production and I also wanted to see if I could install RSS & a mobile template Mod.


Upgraded to 3.0.8 which was the normal seamless experience.


Then entered the word of AutoMod.  Which as with most things sent to make life easier totally screwed me.  Firstly the app has a few 'update' file options.  Live, direct FTP or if they fail (because you have good security) then it will download the modified files and let you update at your leisure.


The download (zip, tar.gz or .tar) worked once.  And then all subsequent files appeared to be corrupt.  There are some posts on the forum with no obvious fix.


Tried FTP - #FAIL ! - it totally ignored (or maybe I mis-typed) the FTP path which resulted in the files getting splatted all over the structure.  Chaos, and a broken site.


Its OK, I have a backup - #FAIL #2.  Permissions all wrecked.  


Stop, slow down, think .. All the data is in the DB, which is safe, and I have many backups of.  Install a clean 3.0.8 and point the install to the old db.  Well this did'nt work as I'd expected - it wants to use a new db.  A quick google and just replacing the config.php from the screwed install got me working.  YAY.


Go to bed


Wake up to Bot hell .. I'd assumed (naively) that the .8 anti-bot would have been better, I'd enabled everything. Not the case so I went back and installed the tried and trusted Anti-Bot question mod.  


Again trying (stupidly) with AutoMod - #FAIL *sigh* - going off that very quickly.  


Manually made the changes and all is well.


EDIT : New and improved anti-bot registration installed - Peoplesign (which also required me to update to a 3.0.8 style)


EDIT :  Peoplesign didnt prevent all spam signups, wow they are persistent.  Reverted to the 'ask a question' default phpBB sign up options.  So far so good.

Tuesday, 13 July 2010

Adding Google Analytics to PHPBB


Create the profile as normal and past the code snippet into your :


/styles/<your_style>/template/overall_footer.html

Before the final /body tag


</table>
<br clear="all" />
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17416825-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</body>
</html>

If your using multiple styles then you'll need to update each .html file
Once done make sure your clear the forums cache in the Admin panel.

Tuesday, 24 November 2009

Installing Anti Bot Question Mod to PhpBB Forum

Each and everytime I do this it takes me at least an hour .. unlike the instructions which say 5-10 mins. Mostly because I forget all the lessons previously learned so here are my notes for next time.


Open the xml instructions and read carefully !! note that some lines are inserted after and some before.

In the 1.2.0 Mod instructions the following are wrong ..

'S_CONFIRM_CODE' which you are asked to search for has been replaced with 'S_CONFIRM_REFRESH'

Edit the text against language/en/common.php to reflect where the question text appears. This will vary depending on the theme being used.

'AB_QUESTION_EXPLAIN' => 'For protection against spam, Answer the above question.',

Finally don't use CoreFTP to edit the files. It must add some hidden characters and screws the files up. Download BlueFish or Notepad++ and edit the files locally.  When you upload dont forget to check permissions - 644.