1
xd9527
Re: can i newbb multi attachment file upload?
  • 2019/7/1 5:41

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


Quote:

Mamba wrote:
I would need to know the exact version, if possible...


I found it , [CBB 4.33 RC7]

I just tested from this site
https://waterlily-lsl.com/modules/newbb

download
https://waterlily-lsl.com/modules/newbb/viewtopic.php?topic_id=195

Resized Image



2
xd9527
Re: can i newbb multi attachment file upload?
  • 2019/6/30 15:13

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


oops
I remembered it, is CBB long-established.



3
xd9527
can i newbb multi attachment file upload?
  • 2019/6/28 4:45

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


newbb attachment file upload one at a time
how can I multi uploads ?
I remember old version can multi attachment files.

thanks.

xoops 2.5.9
module 
newbb 4.34 Final



4
xd9527
hack newbb rate & quickreply to facebook UI style
  • 2019/6/26 16:05

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


Resized Image

newbb topic rate is less useful features
I think it is a problem with the UI
so i try hack it to facebook style

result
Resized Image

Quote:
xoops : 2.5.9
module : newbb 4.34 Final
template : newbb_viewtopic.tpl
css framework: Bootstrap3
icon : Font Awesome 4.7.0



<!-- only for login user //-->
<{if $viewer_level gt 0}>

<!-- 
modal for rate //-->
<div class="modal fade bs-example-modal-sm container" id="replyrate" tabindex="-1" role="dialog" aria-labelledby="replyrate">
<
div class="modal-dialog btn-bottom" role="document">
<
div class="modal-content btn-group" role="group">
<
button type="button" class="btn btn-default" onclick="location.href='/modules/<{$xoops_dirname}>/ratethread.php?topic_id=<{$topic_id}>&amp;forum=<{$forum_id}>&amp;rate=5';"><class="fa fa-thumbs-o-up fa-2x" aria-hidden="true"></i><br><{$smarty.const._MD_RATE5}></button>
<
button type="button" class="btn btn-default" onclick="location.href='/modules/<{$xoops_dirname}>/ratethread.php?topic_id=<{$topic_id}>&amp;forum=<{$forum_id}>&amp;rate=4';"><class="fa fa-smile-o fa-2x" aria-hidden="true"></i><br><{$smarty.const._MD_RATE4}></button>
<
button type="button" class="btn btn-default" onclick="location.href='/modules/<{$xoops_dirname}>/ratethread.php?topic_id=<{$topic_id}>&amp;forum=<{$forum_id}>&amp;rate=3';"><class="fa fa-meh-o fa-2x" aria-hidden="true"></i><br><{$smarty.const._MD_RATE3}></button>
<
button type="button" class="btn btn-default" onclick="location.href='/modules/<{$xoops_dirname}>/ratethread.php?topic_id=<{$topic_id}>&amp;forum=<{$forum_id}>&amp;rate=2';"><class="fa fa-frown-o fa-2x" aria-hidden="true"></i><br><{$smarty.const._MD_RATE2}></button>
<
button type="button" class="btn btn-default" onclick="location.href='/modules/<{$xoops_dirname}>/ratethread.php?topic_id=<{$topic_id}>&amp;forum=<{$forum_id}>&amp;rate=1';"><class="fa fa-thumbs-o-down fa-2x" aria-hidden="true"></i><br><{$smarty.const._MD_RATE1}></button>
</
div>
</
div>
</
div>

<!-- 
modal for quickreply //-->
<div class="modal fade bs-example-modal-sm container" id="replyquick" tabindex="-1" role="dialog" aria-labelledby="replyquick">
<
div class="modal-dialog btn-bottom" role="document">
<
div class="modal-content modal-body"><button type="button btn-default" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<{
$quickreply.form}>
</
div>
</
div>
</
div>

<!-- 
fix bottom navbar //-->
<div class="navbar-fixed-bottom container" id="postnav" style="bottom:12px;">

<!-- 
rate button //-->
<{if $rating_enable}>
<
class="btn btn-default btn-lg" style="box-shadow: 0 0 15px 0 grey" data-toggle="modal" data-target="#replyrate"><class="fa fa-thumbs-o-up" aria-hidden="true"></i><{$smarty.const.THEME_LIKE}></a>&nbsp;
<{/if}>

<!-- 
reply button //-->
<{if $quickreply.show}>
<
class="btn btn-default btn-lg" style="box-shadow: 0 0 15px 0 grey" data-toggle="modal" data-target="#replyquick"><class="fa fa-comment-o" aria-hidden="true"></i><{$smarty.const.THEME_FORUM_REPLY}></a>&nbsp;
<{/if}>

​​​​​​​<!-- modal-dialog move to bottom //-->
<style>.btn-bottom {positionabsolute;bottom:48px;z-index:9999;} </style>

<!-- 
scroll hide bottom navbar //-->
<script>
$(
window).scroll(function(){
var 
scrollBottom = $("body").height()-$(window).height()-60;
if (
scrollBottom 120 )
{
if ($(
this).scrollTop() > 60 && $(this).scrollTop() < scrollBottom)
{ $(
'#postnav').fadeIn(); }
else {  $(
'#postnav').fadeOut(); }
}
else
{
$(
'#postnav').fadeIn();
}
});
</
script>
</
div>
<{/if}>


done.

my bloghttps://3q.9527.tw/125



5
xd9527
Re: Track Xoops user detail in Google Analytics
  • 2018/2/5 1:49

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


thank you Mamba
can add GA code in system maybe next xoops vertion
like wordpress have this function



6
xd9527
Track Xoops user detail in Google Analytics
  • 2018/1/31 9:21

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


Step1. Enables GA User-ID
https://support.google.com/analytics/answer/3123662

Step2. Add Track code in your xoops template
use new track code (gtag.js)
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_UAID"></script>
<{if 
$xoops_isuser}>
<
script>
window.dataLayer window.dataLayer || [];
function 
gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config''GA_TRACKING_UAID', { 'user_id''<{$xoops_name}>' });
</
script>
<{else}>
<
script>
window.dataLayer window.dataLayer || [];
function 
gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config''GA_TRACKING_UAID', { 'user_id''<{$smarty.const._GUESTS}>' });
</
script><{/if}>


if use old code (analytics.js)
<script>
(function(
i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(
i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(
window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create''GA_TRACKING_UAID''YOUR_DOMAIN_NAME');
<{if 
$xoops_isuser}>
var 
xoopsuser_name "<{$xoops_name}>";
ga('set''userId'xoopsuser_name );
<{/if}>
ga('send''pageview');
</
script>


Clear Template Cache
now you can track your xoops user log detail in Google Analytics

reference
https://developers.google.com/analytics/devguides/collection/gtagjs/migration
https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
https://developers.google.com/analytics/devguides/collection/gtagjs/setting-values

Resized Image
Resized Image

thanks , i'm come from taiwan. (not china)
my english very pool , so embarrassed

My Blog
https://3q.9527.tw/103



7
xd9527
Re: hack youtube for html5 & bootstrap3 RWD
  • 2016/1/20 7:43

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


thank Mamba :)

//compatible old all topic youtube code //

if your site have many old topic used youtube code
but you don't want edit many topic?

ok , find this code
$src "http://www.youtube.com/embed/" $matches[2];


change to this code
$src "http://www.youtube.com/embed/" $matches[2];
if (empty(
$width) || empty($height))
{
$width 16;$height 9;}
 if ((
$width) > 16 ||($width) > 9
{if ((
$width $height) > 1.5)
{
$width 16;$height 9;}
else {
$width 4;$height 3;} }


logic
1. if empty , auto add 16:9
2. if larger size (425 or other), auto change to 16:9 or 4:3

done!



8
xd9527
hack youtube for html5 & bootstrap3 RWD
  • 2016/1/14 4:06

  • xd9527

  • Just popping in

  • Posts: 8

  • Since: 2016/1/13


Youtube have many new update ,
so i'm try hack this , for html5 and RWD...

hack point
1. compatible https
2. compatible long url and short url
3. of cause html5 , no flash
4. for bootstrap3 responsive embed , 16:9 and 4:3 and RWD
5 .mobile can full screen

just edit 2 files
\class\textsanitizer\youtube\youtube.php
\language\english\formdhtmltextarea.php


step1. edit \class\textsanitizer\youtube\youtube.php

old default height and width
var text2 prompt(enterFlashWidthPhrase"425");
var 
text3 prompt(enterFlashHeightPhrase"350");


change to 16:9
var text2 prompt(enterFlashWidthPhrase"16");
var 
text3 prompt(enterFlashHeightPhrase"9");


--

old only long url
if (!preg_match("/^http://(www.)?youtube.com/watch?v=(.*)/i"$url$matches)) {
    
trigger_error("Not matched: {$url} {$width} {$height}"E_USER_WARNING);
 
    return 
"";
 }
$src "http://www.youtube.com/v/" $matches[2];


change to compatible long url and short url , (i'm code beginner, so stupid code)
if (preg_match("/^http[s]?://(www.)?youtu.be/(.*)/i"$url$matches) ) { }
elseif (
preg_match("/^http[s]?://(www.)?youtube.com/watch?v=(.*)/i"$url$matches)) { }
else{
  
trigger_error("Not matched: {$url} {$width} {$height}"E_USER_WARNING);
  return 
"";
  }
 
$src "http://www.youtube.com/embed/" $matches[2];


--

old for flash object
$code "<object width='{$width}' height='{$height}'><param name='movie' value='{$src}'></param>" .
        
"<param name='wmode' value='transparent'></param>" .
        
"<embed src='{$src}' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed>" .
        
"</object>";


change to bootstrap3 RWD embed-responsive 16by9 and 4by3
$code "<div class='embed-responsive embed-responsive-{$width}by{$height}'>" .
        
"<iframe frameborder='0' class='embed-responsive-item' src='{$src}?controls=1&showinfo=0&rel=0&disablekb=1' allowfullscreen></iframe></div>";


--

step2. edit language \language\english\formdhtmltextarea.php
define('_XOOPS_FORM_ALT_ENTERHEIGHT','(Video 16:9 or 4:3) input Height 9 or 3 :');
define('_XOOPS_FORM_ALT_ENTERWIDTH','(Video 16:9 or 4:3) input Width 16 or 4 :');


done!

try this

use newbb dhtml , click youtube, paste short url
Resized Image

input video width , default 16
Resized Image

input video height , default 9
Resized Image

test more, long and short , 16:9 and 4:3
Resized Image

post topic , video is widescreen , so black of 4:3 .
Resized Image

try my mobile phone, RWD ok !
Resized Image

thanks , i'm come from taiwan. (not china)
my english very pool , so embarrassed
everybody can change my pool translate :P

and hope next version have new best youtube code.

my blog
http://3q.9527.tw/80




TopTop



Login

Who's Online

203 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 203


more...

Donat-O-Meter

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

Latest GitHub Commits