How can I convert the topic preview codes for Punbb?
3 posters
Page 1 of 1
How can I convert the topic preview codes for Punbb?
Good morning dear all,
I have two codes for topic preview:
These Codes are for PHPBB2:
JavaScript:
CSS:
and I want to convert them for PunBB.
Best Regards,
Dark-Avenger
I have two codes for topic preview:
These Codes are for PHPBB2:
JavaScript:
- Spoiler:
- Code:
/*Topic Preview Forumotion Add On
*Created by Rideem3 of forum.malware-site.www
*Use of this script is prohibited without this full copyright in place
*/
if (/\/?f\d+.*/.test(window.location.pathname)) {
$(function () {
$('a.topictitle').after('<a href="#" style="margin-left: 5px;" class="preview_topic"><span class="topicpreviewicon"><br />Εμφάνιση αρχικού θέματος <img src="http://i57.servimg.com/u/f57/18/10/12/74/previe11.png"/></span></a>');
$('.preview_topic').click(function () {
var url = this.previousSibling.href;
$('body').prepend('<div style="width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 10000; opacity: 0.4; background-color: #3E3E3E;" class="modal" id="document_modal"></div><div id="topic_popup" class="popupWrapper" style="z-index: 10001;"></div>');
$('#topic_popup').load(url + ' .post:first', function () {
$('#document_modal').click(function () {
$('#document_modal, #topic_popup').remove();
});
});
return false;
});
});
}
CSS:
- Spoiler:
- Code:
/* Topic Preview */
.popupWrapper {
background-color: rgba(70, 70, 70, 0.6);
border-radius: 4px 4px 4px 4px;
box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);
left: 300px;
margin: 0 auto !important;
max-height: 400px;
max-width: 700px;
overflow: auto;
padding: 4px;
position: fixed !important;
top: 100px;
}
.topicpreviewicon {
opacity:0.3;
}
.topicpreviewicon:hover {
opacity:0.9;
}
/* End Of Topic Preview */
and I want to convert them for PunBB.
Best Regards,
Dark-Avenger
Last edited by Dark-Avenger on March 17th 2014, 9:29 pm; edited 1 time in total
Re: How can I convert the topic preview codes for Punbb?
I had actually written a preview function a few months back, except I believe it doesn't work fully for punbb.
You can try it below.
Administration panel > modules > javascript codes management > create a new script
Placement : in the sub forums
You can try it below.
Administration panel > modules > javascript codes management > create a new script
Placement : in the sub forums
- Code:
$(function() {
$('a.topictitle').after(' <img id="topicPreview" src="http://i56.servimg.com/u/f56/18/45/41/65/new_wi10.gif" title="Preview topic" alt="Preview" style="cursor:pointer;" />');
$('img#topicPreview').click(function() {
$('body').append(
'<div id="preview-filter" style="position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0, 0.5);cursor:pointer;z-index:10;"></div>'+
'<div id="topicPreview-container" style="top:20%;left:15%;right:15%;padding:4px;position:fixed;z-index:50;background:#D1D1D1;border-radius:5px;box-shadow:0px 0px 2px rgba(0,0,0, 0.5) inset;">'+
'<div id="topicPreviewing" style="max-height:400px;overflow-y:auto;">'+
'<center>'+
'<span class="topicPreview-loading" style="font-weight:bold;font-size:18px;">'+
'Loading...'+
'</span>'+
'</center>'+
'</div>'+
'</div>'
);
$('#topicPreviewing').load($(this).siblings('a.topictitle').attr('href')+' .post:eq(0)');
$('#preview-filter').click(function() {
$('#preview-filter, #topicPreview-container').remove();
});
});
});
Re: How can I convert the topic preview codes for Punbb?
Good morning Ange,
It seem not working furthermore it has freezed some other javascripts.
It seem not working furthermore it has freezed some other javascripts.
Re: How can I convert the topic preview codes for Punbb?
I tested on punbb and for me it is working however, the layout style is messed up. All other versions except for punbb work 100%.
Do you have any scripts that could be conflicting with it ?
Do you have any scripts that could be conflicting with it ?
Re: How can I convert the topic preview codes for Punbb?
I removed all the other scripts and left it alone but its not working. Furthermore the recent topics widget has been freezed.
Re: How can I convert the topic preview codes for Punbb?
That is very weird. Could you provide a link to the forum you're placing this one ?
Thank you
Thank you
Re: How can I convert the topic preview codes for Punbb?
Yes here it is my test forum
Is going wrong something with database?
Update1:
I try to force the default templates and its working. How can I find which javascript conflicts the other?
- Spoiler:
- Code:
http://computer-lab.forumgreek.com/
Is going wrong something with database?
Update1:
I try to force the default templates and its working. How can I find which javascript conflicts the other?
Re: How can I convert the topic preview codes for Punbb?
Hi,
Its solved the reason was the global problem with scrolling announcements.
Best Regards,
Dark-Avenger
Its solved the reason was the global problem with scrolling announcements.
Best Regards,
Dark-Avenger
Re: How can I convert the topic preview codes for Punbb?
Garbaged
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Templates/CSS Posting Preview PunBB
» how to convert these codes
» Convert CSS postprofile codes for BB3 to BB2
» Color Codes for punBB
» How do I make HTML-codes work in Invision board? (It only works in "Preview Mode")
» how to convert these codes
» Convert CSS postprofile codes for BB3 to BB2
» Color Codes for punBB
» How do I make HTML-codes work in Invision board? (It only works in "Preview Mode")
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum