×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: mobile integration

mobile integration 11 years 11 months ago #15637

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Hi
I have tried to get CompoJoom working with MobileJoomla but without success.
Any ideas or development to make this possible would be greatly appreciated.
I'd even be happy to remove it when viewed from mobile.
Cheers
Alex

Re: mobile integration 11 years 11 months ago #15647

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Alex,

is this what you are talking about? www.mobilejoomla.com/

Daniel

Re: mobile integration 11 years 11 months ago #15651

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Hi Daniel

Yes, exactly, sorry for not beeing more precise.

I have tried some of the tips they give on this page to get several components integrated: www.mobilejoomla.com/documentation/15-te...joomla-template.html

It worked with the google maps plugin ( tech.reumer.net/ ) and extravote ( extensions.joomla.org/extensions/clients...tings-a-reviews/5483 ) but not with CompoJoom.

Specifically one of the things I have done is adding a reference to your js ( www.barbalex.ch/components/com_comment/j...t/jscripts/client.js ) that is added every time the page is shown (in js/custom_preload.txt of mobilejoomla). This does not seem to be enough though.

I also tried to add "$('#comment').remove();" in mobilejoomlas custom.js but no matter what event I hang it on to (pagebeforcreate, pageshow...) it seems like your html has not been added to the page yet because I get an error saying #comment is null.

Another thing that is helpful is this extension of mobilejoomla here: www.mobilejoomla.com/extension/advanced/mobile-content.html . For example I can get google maps to show a lot less high (200px instead of 450px) and I can make another extension completely disappear on mobile (AutoToc, because I could not get its links to anchors to work - a jQuery mobile issue, because jQuery mobile uses # in the url for other stuff). This works because these extensions are called by adding text in {} brackets inside articles and categories. So this does not work for CompojoomComment either.

Hope this helps to pinpoint the issue.

Alex

Re: mobile integration 11 years 11 months ago #15654

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
are you sure that it is $('#comment').remove(); and not $('comment').remove(); ???

You don't need the # if this is mootools.

Kind regards,
Daniel

Re: mobile integration 11 years 11 months ago #15659

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
hm, I don't know mootools or the innards of joomla but some javascript, jQuery and jQuery mobile.
Without # I still get "$("comment") is null"
Alex

Re: mobile integration 11 years 11 months ago #15672

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
May I see your site please?
Daniel

Re: mobile integration 11 years 11 months ago #15679

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
www.barbalex.ch
compojoom comment is used for instance here: www.barbalex.ch/artendaten/evabmobile/
happy to give you administrator access if you want
Alex

Re: mobile integration 11 years 10 months ago #15704

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
could you perhaps try with:
$('comment').hide();

This hides the comment - at least in firefox it works. Ah and it should be actually
window.addEvent('domready', function() {
$('comment').hide();
});

Add this to the head of your mobile template after the loading of mootools.

Daniel

Re: mobile integration 11 years 10 months ago #15714

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Hi Daniel

I dont know enough of jQuery mobile and how it works. I could not find a html that looked like a mobile template in the folder of my mobile template (mobile elegance).

I did find a file in its js folder called pageinit.js. It contains code for the events pageinit, pagebeforecreate and pageshow.

On good luck I added "$('comment').hide();" to the function "tplPagePostProcessing" that is called on pageinit. And it works!

Thanks for your help!

EDIT: This only works an pages that include CompoJoom comment. On others it produces an error "$("comment") is null" and the page stays blanc. So I changed to
if ($('comment') != null) {
$('comment').hide();
}
and this works!

Alex

Re: mobile integration 11 years 10 months ago #15720

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Glad to hear that you solved this. However keep in mind that this is js - the browser is still loading the comments and you are just hiding them. This means that if you have 200 comments under an article it will take some time for them to load and then the browser will hide them. The best thing would be to hide the execution of the compojoomcomment - content plugin, but I don't know if the mobile joomla supports it. I need to test that component.

Cheers,
Daniel

Re: mobile integration 11 years 10 months ago #15731

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
hm
maybe I can even only hide the parts meant for making new comments and show the existing comments
that way loading them is a feature...
will try soon and tell you if this suceeds
Alex

Re: mobile integration 11 years 10 months ago #15733

  • Alexander Gabriel
  • Alexander Gabriel's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
o.k., I think I got it:

This here added to pageinit.js removes all else but shows the comments:
if (document.id('comment') != null) {
document.id('CommentMenu').hide();
document.id('joomlacommentform').hide();
$$('.postfooter').hide();
}

then adding this to custom.css removes the user symbol (which is not found, produces an error) and aligns the username to the comment:
#Comments ul li.post div.posthead span.username {
background: none;
padding-left: 5px;
}

and this removes another image that is not found:
div.postcontent {
background: none !important;
}

and this removes unused space at the bottom:
#comment .comment_content p {
margin-bottom: 0px;
}

Hope this helps someone else.
Alex
  • Page:
  • 1
Time to create page: 0.231 seconds