How to display user's phone number in Joomla 3.2 frontend - joomla3.0

I'm building a community website using Joomla 3.2, and I would like to display users' phone numbers and city in the front-end.
I'm using this code to call these info from the database
<span class="contact-mobile">
<?php echo JText::sprintf('USER_PHONE','<span>'.$infoUser -> phone.'<span>');?>
</span>
<span class="city">
<?php echo JText::sprintf('USER_CITY','<span>'.$infoUser -> city.'<span>');?>
</span>
Unfortunately, it doesn't work. Can someone please show me how to make it work.
Thanks for your help.

Related

JHipster Authority Operations doesn't work

I am using JHipster to develop my project with Angular1.
I want to hide some buttons etc. for security.
'*jhiHasAnyAuthority'
command works for Angular2+ project but i am using Angular1 and i don't know how to hide elements according to authority.
Also i saw in navbar.html
has-authority="ROLE_ADMIN"
are used by default to hide admin menu. When i try to use same command for my entity, nothing changes.
There is a similar question as yours which was nicely answered here
I myself have used both has-authority="" and has-any-authority="" and as an example of your query on the navbar.html, let's assume you have created an entity named Manager, this will be only visible after login from a ROLE_MANAGER or ROLE_ADMIN.
<li ui-sref-active="active" has-any-authority="ROLE_MANAGER, ROLE_ADMIN">
<a ui-sref="manage" ng-click="vm.collapseNavbar()">
<span class="glyphicon glyphicon-flash"></span>
<span class="hidden-sm" data-translate="global.menu.entities.manager">Manager</span>
</a>
</li>
Note: ROLE_MANAGER is a customer role added by me and not by the default jhipster generator.

Ionic App - Cordova inApp Browser

I have created an ionic android app that reads data from the database. One of the fields in the database is the website url. I'm doing data binding where I can display the url using: {{accommodation.website}}. I want to be able to use this to display an external web page. Unfortunately this is not working using this code:
<a ng-href="#" target="_self" onclick="window.open('{{accommodation.website}}','_self','location=yes')" class="button button-positive">Website</a><p>{{accommodation.website}}</p>
and as a result it displays :
http://localhost:8100/%7B%7Baccommodation.website%7D%7D
Cannot GET /%7B%7Baccommodation.website%7D%7D
But when I use:
<a ng-href="#" target="_self" onclick="window.open('http://www.w3schools.com/angular/ng_ng-href.asp','_self','location=yes')" class="button button-positive">Website</a><p>{{accommodation.website}}</p>
It works fine on android phone. Instead of hard coding the url, I want to use data binding as I am working with ion-list. I spent all day trying to fix this. Please help.
Hope this will help you, for detail, go to Nic's Blog, and check out comments. Regards!
<a ng-href="{{accommodation.website}}" target="_self" onclick="window.open(this.href,'_self','location=yes')" class="button button-positive">Website</a><p>{{accommodation.website}}</p>
First, use ng-click, not onclick, but that is beside the point since you should just be using ng-href="{{accommodation.website}}"

how can i Google + sign in in angular js

I am new in angular js. In the last few days i am trying to log in into my app using google account. Using html google+ button i have successfully done that using javascript. Bellow showing part of implemented code that is on simple (html+javascript).
<span id="signinButton">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="389760997134-uredjv5rat0k3vsjaqlt7nn4pbgtqrat.apps.googleusercontent.com"
data-cookiepolicy="single_host_origin"
data-requestvisibleactions="http://schema.org/AddAction"
data-scope="https://www.googleapis.com/auth/plus.me">
</span>
</span>
When trying that in angular i dont have any idea what what to do. Please give mw some idea what to do. I did not find anything clear over the internet. Any tutorial link or any partial project.

CakePHP External Link

I have a website that has links which, if clicked, should open a new tab and load that particular website.
I've tried using this example:
<?php echo $this->Html->link('CakeBook', 'http://cakephp.org', array('class'=> 'myclass', 'target'=>'_blank')); ?>
The problem is it isn't even clickable. I'm using CakePHP 2.5.5

Is There A Way To Wrap PHPBB Forums And MediaWiki Into Default Layout Of CakePHP?

Has anyone successfully been able to do this?
I want MediaWiki and PHPBB to have the same header and footer as my website (default.ctp)
So instead of
<?php echo $content_for_layout; ?>
I would want to echo PHPBB or MediaWiki.
If you have a code example please paste here,
many thanks
Integrating PhpBB or Mediawiki with Cake will not be a quick job. The easiest thing to do is to install those applications separately and load them in an iframe.

Resources