The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How can I convert the topic preview codes for Punbb?

View previous topic View next topic Go down

Solved How can I convert the topic preview codes for Punbb?

Post by Van-Helsing on March 17th 2014, 10:17 am

Good morning dear all,
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

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Ange Tuteur on March 17th 2014, 10:27 am

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
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();
  });
  });
  });

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Van-Helsing on March 17th 2014, 10:36 am

Good morning Ange,
It seem not working furthermore it has freezed some other javascripts.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Ange Tuteur on March 17th 2014, 10:42 am

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 ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Van-Helsing on March 17th 2014, 11:39 am

I removed all the other scripts and left it alone but its not working. Furthermore the recent topics widget has been freezed.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Ange Tuteur on March 17th 2014, 11:42 am

That is very weird. Could you provide a link to the forum you're placing this one ?

Thank you Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Van-Helsing on March 17th 2014, 11:50 am

Yes here it is my test forum
Spoiler:

Code:
http://computer-lab.forumgreek.com/
Ange something is going wrong with my test forum I was placed again all the javascripts and all now are disabled.
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?

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by Van-Helsing on March 17th 2014, 9:28 pm

Hi,
Its solved the reason was the global problem with scrolling announcements.

Best Regards,
Dark-Avenger

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I convert the topic preview codes for Punbb?

Post by SLGray on March 18th 2014, 4:13 am

Garbaged


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum