[RC2] phpBB Ajax Like

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post by emosbat »

@muggins
because then if someone install another MOD from me (or others) that need jquery. then we will have duplicate entry of jquery in code and this will cause jquery conflict error.

@Kaycee
I do not see any error from this MOD.
fifahub
Registered User
Posts: 150
Joined: Mon Oct 29, 2012 12:05 pm

Re: [RC2] phpBB Ajax Like

Post by fifahub »

Hi emosbat and thank you for this great mod!
I have a jquery issue between this mod and phpBB Social Network: the like box isn't shown.

This is the jquery code of phpBB SN:

Code: Select all

<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.metadata.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery_cookie.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.timers.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.hoverIntent.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.text-overflow.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.watermark.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.elastic.source.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.events.input.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.form.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.titlealert.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.detectmobilebrowser.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.expander.min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.editable.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.jgrowl_minimized.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/underscore-min.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery.mentionsInput.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.socialnet.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.confirmbox.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.im.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.notify.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.approval.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.userstatus.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.activitypage.js"></script>
<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/m.profile.js"></script>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function($){
	socialNetwork.init({
		allow_load: {B_AJAX_LOAD_ALLOW},
		rtl: '{S_CONTENT_DIRECTION}' == 'rtl' ? true: false,
	    expanderTextMore: '{L_SN_EXPANDER_READ_MORE}',
	    expanderTextLess: '{L_SN_EXPANDER_READ_LESS}',
	    browserOutdatedTitle : '{L_BROWSER_OUTDATED_TITLE}',
	    browserOutdated : '{L_BROWSER_OUTDATED}',
	    showBrowserOutdated: '{S_SN_SHOW_OUTDATED_BROWSER_INFO}' == '1' ? true : false,
		user_id: {S_SN_CURRENT_USER_ID},
		cookie : {
			name : '{COOKIE_NAME}',
			path : '{COOKIE_PATH}',
			domain : '{COOKIE_DOMAIN}',
			secure : '{COOKIE_SECURE}'=='1'
		},
		confirmBox: {
		    enable: '{S_SN_CB_ENABLE}' == '1' ? true : false,
		    resizable : '{S_SN_CB_RESIZABLE}' == '1' ? true : false,
		    draggable : '{S_SN_CB_DRAGGABLE}' == '1' ? true : false,
		    modal : '{S_SN_CB_MODAL}' == '1' ? true : false,
		    width : '{S_SN_CB_WIDTH}',
		    button_confirm : '{L_SN_US_CONFIRM}',
		    button_cancel : '{L_SN_US_CANCEL}',
		    button_close : '{L_SN_US_CLOSE}',
		    postMinChar : {I_POST_MIN_CHARS}
		},
		enableModules : {
			im : '{SN_MODULE_IM_ENABLED}' == '1',
			us : '{SN_MODULE_USERSTATUS_ENABLED}' == '1',
			ntf : '{SN_MODULE_NOTIFY_ENABLED}' == '1',
			fms : '{SN_MODULE_APPROVAL_ENABLED}' == '1',
			ap : '{SN_MODULE_ACTIVITYPAGE_ENABLED}' == '1' && '{S_ON_ACTIVITYPAGE}' == 1,
			up : '{SN_MODULE_PROFILE_ENABLED}' == '1'
		},
		comments : {
			watermark : '{L_SN_US_WRITE_COMMENT}',
			empty : '{L_SN_US_EMPTY_COMMENT}',
			deleteTitle : '{L_SN_CB_DELETE_COMMENT_TITLE}',
			deleteText : '{L_SN_CB_DELETE_COMMENT_TEXT}'
		},
		menuPosition:{
			my : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->right<!-- ELSE -->left<!-- ENDIF --> top",
	        at : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->left<!-- ELSE -->right<!-- ENDIF --> top"
	        }
	});

// ## ACTIVITY PAGE -=- START ##
<!-- IF SN_MODULE_ACTIVITYPAGE_ENABLED and S_ON_ACTIVITYPAGE -->
	socialNetwork.ap.init({
		url : '{SOCIALNET_ROOT_PATH}activitypage.php',
		blockOnlineUsers : '{B_SN_BLOCK_ONLINE_USERS_ENABLED}' == '1',
		tikTakOnline : {I_SN_BLOCK_ONLINE_USERS_CHECK_TIME},
		urlUsersAutocomplete: '{U_USERS_AUTOCOMPLETE}'
	});
<!-- ENDIF -->
// ## ACTIVITY PAGE -=- END ##

// ## INSTANT MESSENGER -=- START ##
<!-- IF SN_MODULE_IM_ENABLED -->
	socialNetwork.im.init({
		url: '{SOCIALNET_ROOT_PATH}im.php',
		rootPath: '{SOCIALNET_ROOT_PATH}',
		newMessage: '{L_SN_IM_NEW_MESSAGE}',
		namesMe: '{S_SN_USERNAME}',
		youAreOffline: '{L_SN_IM_YOU_ARE_OFFLINE}',
		titleNew: '{L_SN_IM_NEW_MESSAGE}',
		sound: '{S_SN_IM_USER_SOUND}' == '1' ? true: false,
		isOnline: '{SN_IM_ONLINE}' == '1' ? true: false,
		timersMin: {SN_IM_MIN_CHECK},
		timersMax: {SN_IM_MAX_CHECK},
		lastCheckTime: {SN_IM_LAST_CHECKTIME},
		linkNewWindow: '{S_SN_IM_LINK_NEW_WINDOW}' == '1' ? true: false,
		playSoundOnPageLoad: {SN_IM_PLAY_SOUND_ON_PAGELOAD},
		sendSequence: {
			alt : {SN_IM_SENDSEQ_ALT},
			ctrl : {SN_IM_SENDSEQ_CTRL},
			shift : {SN_IM_SENDSEQ_SHIFT},
			key : {SN_IM_SENDSEQ_KEY}
		},
		closeSequence : {
			alt : {SN_IM_CLOSESEQ_ALT},
			ctrl : {SN_IM_CLOSESEQ_CTRL},
			shift : {SN_IM_CLOSESEQ_SHIFT},
			key : {SN_IM_CLOSESEQ_KEY}
		}
	});
<!-- ENDIF -->
// ## INSTANT MESSENGER -=- END ##

// ## NOTIFICATIONS -=- START ##
<!-- IF SN_MODULE_NOTIFY_ENABLED -->
	socialNetwork.ntf.init({
		url:'{SOCIALNET_ROOT_PATH}notify.php',
		theme: '{S_SN_NTF_THEME}',
		life: {SN_NTF_LIFE},
		checkTime: {SN_NTF_CHECKTIME}
	});
<!-- ENDIF -->
// ## NOTIFICATIONS -=- END ##

// ## FRIEND MANAGEMENT SYSTEM -=- START ##
<!-- IF SN_MODULE_APPROVAL_ENABLED -->
	socialNetwork.fms.init({
		url: '{SOCIALNET_ROOT_PATH}approval.php',
		urlFMS: '{SOCIALNET_ROOT_PATH}fms_users.php',
		noFriends: '{L_FAS_FRIENDGROUP_NO_TOTAL}',
		deleteUserGroup: '{L_FMS_DELETE_UFG}',
		deleteUserGroupText: '{L_FMS_DELETE_UFG_TEXT}'
	});
<!-- ENDIF -->
// ## FRIEND MANAGEMENT SYSTEM -=- END ##

// ## USER STATUS -=- START ##
<!-- IF SN_MODULE_USERSTATUS_ENABLED -->
	socialNetwork.us.init({
		watermark : '{L_SN_US_WHATS_ON_YOUR_MIND}',
		emptyStatus : '{L_SN_US_EMPTY_STATUS}',
		url : '{SOCIALNET_ROOT_PATH}userstatus.php',
		urlFetch : '{SOCIALNET_ROOT_PATH}fetch.php',
		deleteStatusTitle : '{L_SN_CB_DELETE_STATUS_TITLE}',
		deleteStatusText: '{L_SN_CB_DELETE_STATUS_TEXT}',
		deleteActivityTitle : '{L_SN_CB_DELETE_ACTIVITY_TITLE}',
		deleteActivityText: '{L_SN_CB_DELETE_ACTIVITY_TEXT}'
	});
<!-- ENDIF -->
// ## USER STATUS -=- END ##

// ## PROFILE -=- START ##
<!-- IF SN_MODULE_PROFILE_ENABLED -->
	socialNetwork.up.init({
		url : '{U_UP_TAB_WALL}',
		urlAJAX : '{U_UP_AJAXURL}',
		urlSelectFriends: '{U_SELECT_FRIENDS}',
		spinner : '{L_SN_UP_TABS_SPINNER}',
		nextText : '{L_NEXT}',
		prevText : '{L_PREVIOUS}',
		dateFormat : '{SN_DATE_FORMAT}',
		dayNames : [ '{L_SN_UP_SUNDAY}', '{L_SN_UP_MONDAY}', '{L_SN_UP_TUESDAY}', '{L_SN_UP_WEDNESDAY}', '{L_SN_UP_THURSDAY}', '{L_SN_UP_FRIDAY}', '{L_SN_UP_SATURDAY}' ],
		dayNamesShort : [ '{L_SN_UP_SUNDAY_MIN}', '{L_SN_UP_MONDAY_MIN}', '{L_SN_UP_TUESDAY_MIN}', '{L_SN_UP_WEDNESDAY_MIN}', '{L_SN_UP_THURSDAY_MIN}', '{L_SN_UP_FRIDAY_MIN}', '{L_SN_UP_SATURDAY_MIN}' ],
		monthNames : [{SN_UP_MONTH_NAMES}],
		monthNamesShort : [{SN_UP_MONTH_NAMES_SHORT}],
		menuPosition:{
			my : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->right<!-- ELSE -->left<!-- ENDIF --> top",
	        at : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->right<!-- ELSE -->left<!-- ENDIF --> bottom"
	        }
		});
<!-- ENDIF -->
// ## PROFILE -=- END ##

});
// ]]>
</script>
If I remove these lines the box is shown:

Code: Select all

<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery-1.8.3.min.js"></script>

// ## PROFILE -=- START ##
<!-- IF SN_MODULE_PROFILE_ENABLED -->
	socialNetwork.up.init({
		url : '{U_UP_TAB_WALL}',
		urlAJAX : '{U_UP_AJAXURL}',
		urlSelectFriends: '{U_SELECT_FRIENDS}',
		spinner : '{L_SN_UP_TABS_SPINNER}',
		nextText : '{L_NEXT}',
		prevText : '{L_PREVIOUS}',
		dateFormat : '{SN_DATE_FORMAT}',
		dayNames : [ '{L_SN_UP_SUNDAY}', '{L_SN_UP_MONDAY}', '{L_SN_UP_TUESDAY}', '{L_SN_UP_WEDNESDAY}', '{L_SN_UP_THURSDAY}', '{L_SN_UP_FRIDAY}', '{L_SN_UP_SATURDAY}' ],
		dayNamesShort : [ '{L_SN_UP_SUNDAY_MIN}', '{L_SN_UP_MONDAY_MIN}', '{L_SN_UP_TUESDAY_MIN}', '{L_SN_UP_WEDNESDAY_MIN}', '{L_SN_UP_THURSDAY_MIN}', '{L_SN_UP_FRIDAY_MIN}', '{L_SN_UP_SATURDAY_MIN}' ],
		monthNames : [{SN_UP_MONTH_NAMES}],
		monthNamesShort : [{SN_UP_MONTH_NAMES_SHORT}],
		menuPosition:{
			my : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->right<!-- ELSE -->left<!-- ENDIF --> top",
	        at : "<!-- IF S_CONTENT_DIRECTION eq 'ltr' -->right<!-- ELSE -->left<!-- ENDIF --> bottom"
	        }
		});
<!-- ENDIF -->
// ## PROFILE -=- END ##

});
// ]]>
</script>
How can I do to solve this issue. Thank you so much for the support.
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post by emosbat »

popup and dialog not working:
- remove all duplicate jquery and jqueryui entries (jquery.js, jquery-min.js, jquery-1.x.y.z.js, jquery-ui.js, jquery-ui-min.js, etc). ONLY include Jquery Pack for phpBB MOD and enable it. if you have more than one jquery in your code you get conflict error from this mod and other mods that use jquery. make sure jquery pack is installed correctly in your theme and is enable and remove all other jquery entries.
fifahub
Registered User
Posts: 150
Joined: Mon Oct 29, 2012 12:05 pm

Re: [RC2] phpBB Ajax Like

Post by fifahub »

If I remove all other jquery entries most of the mods doesn't work.

The issue happens only with those lines of code I posted in the previous post. I can't remove they because then the phpBB SN stops working well.

I'm testing all possible combinations but I am unable to solve it. Can I try something to fix it? Thanks again.
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post by emosbat »

you do not need to remove all of those codes. you only need to remove jquery.js tags like this in that code:

<script type="text/javascript" src="{T_SOCIALNET_JS_PATH}/jquery-1.8.3.min.js"></script>

and ensure that you installed and enabled jquery pack MOD.
volgograd
Registered User
Posts: 118
Joined: Tue Aug 19, 2014 1:34 pm
Name: Anna

Re: [RC2] phpBB Ajax Like

Post by volgograd »

emosbat, thank you for making this mod. I really look forward to getting it working.

It wasn't easy to install for theme and other language, but I think I've followed all instructions now.
I copied over the picture to the theme language folders.
Users are set to "Standard" permissions. What else can I try?
No other jquery mods.

I don't see anywhere to Like the posts though.

Also - Why does it say "posts" below? It looks strange. Same thing in the translation, with the English word. Is something wrong?

Image
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post by emosbat »

did you ran ajaxlike_install.php?
volgograd
Registered User
Posts: 118
Joined: Tue Aug 19, 2014 1:34 pm
Name: Anna

Re: [RC2] phpBB Ajax Like

Post by volgograd »

emosbat wrote:did you ran ajaxlike_install.php?
Yes, I did. Maybe I should uninstall it and run it again?
Image

I am checking all the advanced permissions now, and it is "complex" with all my different user groups.
But I think I set it correctly. I can not see the like button still

I am checking first with Prosilver and in English language, just in case I made a mistake with the Language or Translation or the Theme. But no button yet... I will update immediately if the button appears.
fifahub
Registered User
Posts: 150
Joined: Mon Oct 29, 2012 12:05 pm

Re: [RC2] phpBB Ajax Like

Post by fifahub »

emosbat wrote:you do not need to remove all of those codes. you only need to remove jquery.js tags like this
[...]
Thank you so much, now everything works great!

@volgograd: If you didn't make a mistake during the installation i think it is a problem of permissions.
Check they (both "Group permission" and "User forum permissions").
volgograd
Registered User
Posts: 118
Joined: Tue Aug 19, 2014 1:34 pm
Name: Anna

Re: [RC2] phpBB Ajax Like

Post by volgograd »

The problem for me was that AutoMOD had not patched all the files it said it had patched.
When I looked at them, in a few places, they were not been updated.

If anyone has problem with this MOD you should go through all the changes manually.. AutoMOD is not reliable.
Last edited by volgograd on Tue Aug 26, 2014 5:35 am, edited 2 times in total.
volgograd
Registered User
Posts: 118
Joined: Tue Aug 19, 2014 1:34 pm
Name: Anna

Re: [RC2] phpBB Ajax Like

Post by volgograd »

It's working now. But the AutoMOD is not working properly. It doesn't patch all files. Maybe the AutoMOD needs to be updated.

@emosbat - I will send you my language and theme patch, so you can incorporate them when you have time.
This took a very long time for me and I hope that it would save times for others if the files are saved with your other add-on themes and languages. But I don't know how to do that so I will zip my files and upload them.

Thank you for making this patch! Even if it was hard to install it, I could not have written it myself.

Image
marc60
Registered User
Posts: 28
Joined: Thu Mar 21, 2013 2:20 pm

Re: [RC2] phpBB Ajax Like

Post by marc60 »

Hi,

when the jquery library is already included (other mods)

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

Is it still necessary to install the jquery pack for phpbb?

I installed everything on my forum. Admin is working but in viewtopic the mod is complete invisible. Maybe this have something to do with the messing jquery pack for phpbb?

I dont think so, because the if statements in the viewtopic has nothing to do with jquery, so atleast it should be visible?

thank you
skarekrow
Registered User
Posts: 2
Joined: Fri Sep 05, 2014 8:33 pm

Re: [RC2] phpBB Ajax Like

Post by skarekrow »

I did everything and when I click "like" button it gets me to the top of the page and nothing happens. I installed this jquery pack and still nothing. I don't know english very good, I read this FAQ but I don't know what could be wrong. Please help.
Maurence
Registered User
Posts: 1
Joined: Sat Sep 06, 2014 12:25 pm

Re: [RC2] phpBB Ajax Like

Post by Maurence »

Thanks for the mod.

I translated into Italian

Herethe zip file.
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post by emosbat »

volgograd wrote: @emosbat - I will send you my language and theme patch, so you can incorporate them when you have time.
thanks. I will include them in first post.
marc60 wrote:when the jquery library is already included
it is better to include jq pack instead others. you may missed some code. read first post for more help.
skarekrow wrote:I did everything and when I click "like" button it gets me to the top of the page and nothing happens. I installed this jquery pack and still nothing. I don't know english very good, I read this FAQ but I don't know what could be wrong. Please help.
you may missed so mod code. check source code manually.
Maurence wrote:Thanks for the mod.

I translated into Italian

Herethe zip file.
thanks I will include it in first post.

Return to “[3.0.x] MODs in Development”