Page 43 of 51

Re: [RC2] phpBB Ajax Like

Posted: Wed Jan 29, 2014 1:21 am
by Ludovic B
Hello @emosbat :)

I thought I did all right but...

no LIKE button.

http://www.zebrolution.net/pistes-pour- ... s-t20.html

What's wrong ?

EDIT : sorry the forum had a problem today, I solved it. Can you check the url ?

Re: [RC2] phpBB Ajax Like

Posted: Fri Jan 31, 2014 2:18 pm
by emosbat
please read first post specially detail about installing in other languages and themes

Re: [RC2] phpBB Ajax Like

Posted: Fri Jan 31, 2014 2:33 pm
by Ludovic B
Thanks for being there :)

You mean, what you said here :
- if you use language rather than english, copy all language files to folder of your language (if translate not exist).
?

By "all language files", do you mean :
* the language files of phpBB
* or the language files of your MOD ?

By "folder of your language", do you mean :
* the folder of phpBB ?
* or the folder of the theme ?

Sorry I'm new in phpBB and installing MODs.

EDIT :
* I copied your contrib\fr\root\language\fr\ to my language/fr/mods, and refreshed the theme and template, and emptied the cache
* I also installed the CHANGE (--> FR) to your MOD
, but it still does not work.
The french translation is not taken into account.
An idea why ?

Re: [RC2] phpBB Ajax Like

Posted: Wed Feb 05, 2014 2:21 am
by Ludovic B
Edit : Solved !

Re: [RC2] phpBB Ajax Like

Posted: Sun Feb 09, 2014 10:23 am
by Rob-Rah
I have worked out why this mod was not working for me on some pages....

I have the phpbb gallery installed (heavily hacked by me!). This sits in a new set of folders on the server like this, but all the following will apply to any installation where there are accessible php pages which are not located in the root installation folder itself.

[root]/gallery/files.php

The "like" mod looks for urls by using the built-in $phpbb_root_path definition. We would expect this root path to be equal to "[root]/"

However....... *unfortunately* the real phpbb_root_path is not defined in a standard phpbb installation (see here: https://area51.phpbb.com/phpBB/viewtopi ... 99&t=42239).

So the expression that phpbb pages encounter here will always revert to setting the root path as "./" and not as"[root]/"

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

The gallery mod is written to cope with this, but the Ajaxlike mod doesn't know about this issue. So the mod will use ./ as the root path, which in the context of [root]/gallery/files.php is incorrect (it will use [root]/gallery/).

This is a problem because the ajaxlike mod uses the overall header file to display the rcenet likes notifications. All is fine when viewing topics and so on because their php files sit in the root folder. The problem arises when viewing a page which is not in the root folder but nonetheless includes the overall header for the forum, and which therefore tries to use the ajaxlike functions for displaying notifications of likes.

In short...... the ajaxlike mod cannot reliably use the inbuilt phpbb definition of $phpbb_root_path where you are using subfolders for pages which include the main overall_header template.

It doesn't work to define the phpbb root path directly in constants.php because this file is parsed only after it's actually needed by the phpbb pages (how silly is that?).

So the ajaxlike mod needs to be changed to define the root path itself in each instance it uses it within the overall_header template. Which is annoying. The links in question are avatar, userid in memberlist.php and the post link in viewtopi.php. I have just gone into the relevant bits and hard-coded my own root path (http://www.ukorchidforum.com) into them to fix it. Not ideal, but anyway. The file needing changes was /includes/functions_ajaxlike.php

This bit fixes avatar display:

Code: Select all

function get_avatar_ajaxlike($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
{
        global $user, $config, $phpbb_root_path, $phpEx;

        // Added the next line to redefine the root path
        $phpbb_root_path = 'http://www.ukorchidforum.com/';
Weirdly, fixing the avatar bit above also fixed the profile link to memberlist.php. The next one fixes post-links within the notifications, but not for the first notification in the list:

Code: Select all

function get_notifications()
{

	global $db, $user, $config, $phpbb_root_path, $phpEx;

        // Added the next line to redefine the root path
	$phpbb_root_path = 'http://www.ukorchidforum.com/';
This fixes all entries except the first one in the listbox. To fix the first one I eventually worked out I needed to add in that hardcoded $phpbb_root_path definition in the function get_liked_list() just before both of the two lines starting with this:

$textp = append_sid(

If I put it at the start of that function, the function hangs. Not sure why. It was easier not to try to find out ;)

If someone were using other viewable php pages which used any ajaxlike functions called from those pages, those functions would also need this adjustment. Fortunately that doesn't apply to me here.

I'll try and fathom my other problems out as time goes on.

Thanks!

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 11, 2014 9:32 pm
by eric90066
Great mod. Can't wait to try it out.

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 11, 2014 9:41 pm
by senatorman
Sure a great mod,

When can we expected the first release of this mod?

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 11, 2014 10:23 pm
by Jessica
senatorman wrote:Sure a great mod,

When can we expected the first release of this mod?
It's already been released...download is in the first post.....

Re: [RC2] phpBB Ajax Like

Posted: Sat Feb 15, 2014 1:29 pm
by senatorman
Jessica wrote:
senatorman wrote:Sure a great mod,

When can we expect the first release of this mod?
It's already been released...download is in the first post.....
I mean the release of the first validated version.

The first 1.1.0 had too many bugs, so it is not operative for me. Iám hope whe can expect a good working version soon.

Re: [RC2] phpBB Ajax Like

Posted: Sun Feb 16, 2014 9:40 pm
by senatorman
My forum has two theme's prosilver and subsilver2

When I installed this mod in prosilver it works correctly,
i do al the changes for subsilver2 as write in the installmanual for subsilver2.
And after i checked it serveral times.

In subsilver there i have a problem with the script. and the result is asfollow,

When i click on "like" in a topic, nothing happend, it is not changing in "unlike",
and when i click the link in the header to see all the likes i recieved, there is nothing happens.

The problem is in the script, and maybe the is a conflict between an another script, but i can't find it.

I download and use Firebug for Google Chome, but i don't know how this works, so i have still my problem.

Can anyone help me.

my forum is http://www.auto-forum.nl
Ajax Like mod is only enabled in this forum.
http://www.auto-forum.nl/viewforum.php?f=68

Re: [RC2] phpBB Ajax Like

Posted: Mon Feb 24, 2014 11:35 am
by senatorman
Nobody knows?

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 25, 2014 6:43 pm
by Rob-Rah
I looked at your forum.... but you don't make it clear. Is the page guests see in subsilver or prosilver? It seems to be called skymilesread. Where is the problem showing?

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 25, 2014 8:24 pm
by senatorman
Rob-Rah wrote:I looked at your forum.... but you don't make it clear. Is the page guests see in subsilver or prosilver? It seems to be called skymilesread. Where is the problem showing?
I use indeed theme Skymilesread, and this is a subsilver based theme.
My forum has also installed the original prosilver and subsilver.

In prosilver everything works fine, but in subsilver & skymilesread there is a problem.

I have acivated this mod only in a few subforums and for example you can see working this mod in this topic http://www.auto-forum.nl/viewtopic.php?f=68&t=463

There is an testaccount:

username:test
password:test

The problem is that the ajax-script is not working, so
-When you like, the like where not accepted (there is nothing changed).
-There is no popup when you click on to see al the likes
-In the header the link to see your received likes is not working.

i hope you see my problem.
i can make printscreens,

Re: [RC2] phpBB Ajax Like

Posted: Tue Feb 25, 2014 8:41 pm
by Rob-Rah
I don't mind having a look... I've hacked apart this mod quite a bit for my own forum now. Just to begin, can you send me the basic subsilver overall header file you are using with the mod in it, send it via the pm system here, and then I'll reply with anything I can think of here.

Re: [RC2] phpBB Ajax Like

Posted: Wed Feb 26, 2014 2:50 am
by muggins
Image

Does this call in the body have anything to do with it, or am I stupid at this hour? :oops: