Joomla - hide image in header once user has logged in - joomla1.5

I'm pretty fresh to programming (have started doing Codeacademy this year and am enjoying it) and I have asked this question on other forums to no avail, even though I am sure it can be done.
I want to hide an image in my header of a Joomla site if the user is logged in, but I'm really not sure how to do this.
I know I would have to use the if/else values but I'm not sure how to piece it all together.
Can anyone point me in the right direction?

You haven't given enough information to give a better answer at this point.
If you put the image in a module, then you can use Advanced Module Manager (free extensions) to turn the module off when the visitor is logged in.
The best way to do it would be to upgrade to the latest version of Joomla and use the built in ACL to control what is displayed. The 1.5 series reaches end of life in April so now would be a good time to switch.
Here is how you would set up the ACL in 1.7/2.5:
http://docs.joomla.org/Access_Control_List/1.6-2.5/Tutorial#Allowing_Guest-Only_Access_to_Menu_Items_and_Modules

Here is what you can do :
$user =& JFactory::getUser();
if($user->id)
{
//display the image
}
else
{
//do not display the image
}

Related

Making an overlay for profile picture on FB

TL;DR: look for bold text to see the questions without context.
When something bad (or good, but this is a cruel world) happens, FB has a feature to change your profile picture - when USA legalized gay marriage you could have had a rainbow flag over your pic, when SW7 came out, you could have added a lightsaber, etc.
I wanted to do something similiar for a social campaign and started writing an app for that. I figured it should be possible, as in case of Star Wars it seemed to be managed by private company (Disney), not FB itself.
My plan was to:
download current user profile pic (done, though I cannot get good quality; anyway, gonna fix that later)
in-memory add the banner (done)
upload that photo with banner added (done)
redirect user to photo from (3) with makeprofile=1 as proposed here, to make it users profile picture
profit
Unfortunately, the answer quoted in (4) doesn't seem to be working anymore.
My question is: is this still possible? If yes - how?
If not - do I have any alternatives?
I've also tried figuring out how is the link "Make Profile Picture" in webview composed. It looks like:
https://www.facebook.com/photo.php?fbid=<<picture id>&set=a.<<similiar, but not the same as picture id>>.<<not a clue>>.<<seems to be profile id>>&type=3&makeprofile=1&profile_id=<<profile id, duh>>&pp_source=photo_view
If anyone knows what following parts mean, my issue would probably be solved:
<<similiar, but not the same as picture id>>
<<not a clue>>
<<seems to be profile id>>
I also tried figuring out ProfilePictureSource, but the abstraction itself isn't described anywhere (or I couldn't find it) and judging by permissions needed, that doesn't seem like what I need (why would I need any pages, groups, mailbox or business permissions when I only want to update a profile pic?). If that is the way and I just lost it, please tell me how to use it.
Another way to answer this question would be to propose alternative way of having the banner over profile picture.
For the record, I'm using Python with facebook-sdk wrapper, but only for fast prototyping - I could as well use Java with Spring Social, DLang with manual HTTP calls, whatever - technology isn't an issue, I need a general way here.

confluence display content by user

I am trying to get specific content on a confluence cloud wiki to display content based on a specific user. The scenario here is that there are links on a page but only 1 should display, the one that displays is based on whom ever is logged in.
I have been told how a macro is the way forward, but I have read the documentation and I am at a loss. I do not understand what I have to do or how to write a confluence macro. could someone help me out with either an example or some links? I have searched like crazy, but maybe i am not asking the right questions but hopfully you can all help me out?
There's a plugin for this:
https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility
But I'm not sure how thoroughly it hides the content. It might still be visible if users view the page source. If you're trying to hide content which needs to be really protected, you'll probably need to do something else.
Depending on how many users are going to be using the page, you could also just make separate spaces for them, add the permissions to those spaces, and then use a page-include on your "main" page to display the content. If they don't have access it shouldn't show up. You might experience some formatting issues with that solution, however.
Finally, you could grab the username with jquery and display stuff based on that. This solution will be pretty easy if you are familiar with javascript/jquery.
Edit: Here are some helpful resources on how to use javascript and jquery within confluence:
https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence
https://developer.atlassian.com/confdev/confluence-plugin-guide/writing-confluence-plugins/including-javascript-and-css-resources

OwnCloud enhance core features with App (eg. user registration)

I started looking into OwnCloud app development to add some capabilities I would like to my server. To me it seems like Apps can't modify anything like the Login page or User Management page. Is this the case?
I want to build a user registration app and would love to integrate it into the user management page (if not and it has to exist as its own app page not a big deal). The one big problem I see so far is not being able to add a "Register" link to the login page. I could just go in and add it to the source manually, but I would like to keep the App self contained so others can use it too.
If this is not possible to do in an App I may just need to modify the core application and then see if they will accept my feature addition in a pull request.
Thanks to anyone who can shed some light on this for me. I don't want to waste my time trying to figure out how to do it with an App on the platform if it wont be doable.
After a lot of digging around I did figure out a way to do this.
In the App's app.php file, you can force a script to be loaded if the plugin is enabled:
$api->addScript('script_name'); // without .js
In that script jQuery can be used to add the elements to the page where you need them.
This was a good solution for me since I only needed to add a single button to the login page. I can see this being a bad idea if you want to make vast modifications. At that point you might as well just create a separate page that you have full control over.

Up to date instructions for September 2011 onwards for beginners

Sorry for this basic question but all attempts at Googling and using facebook help only provide out of date information.
I am attempting to make my first fb app. Just an html page saying hello. From what I understand the app (or webpage) is stored on my server and I set up a facebook app that basically points to the URL of the app (or webpage) on my server.
Is this basically correct.
Where do I enter this URL information in my edit app screen. I have followed the latest fb instructions and all I see when I view the app is the admin page in fb for the app.
Does it take a long time for the page to appear.
Is there a current idiots guide. The app design is not a problem for me loading it in to facebook is the problem.
Unfortunately this wasn't very helpful, not because of what you posted but due to the fact that it appears that Facebook has updated the way in which pages are linked to again.
The pages you suggested I look at were well laid out with lots of information on them but they are already out of date and do not seem to correspond with the layout of the Facebook 'dev app' and even the fields in the form seem to have been either dropped added to renamed.
Thanks for trying to help me and I hope that FB may produce some up to date information soon and not keep changing the interface.
I can completely understand your confusion - the Facebook docs give very little information for the complete beginner. The 'Getting Started' section makes some massive assumptions and completely ignores huge key areas you need to know to get your first application up and running.
So to address your points:
Yes, this is basically correct. Apps on Facebook are served up to the user in one of two ways. Either as a 'Canvas App' or a 'Tab App'. A Tab App is an application you can install as a tab on a profile page. A Canvas App can operate on it's own page and has more room as there's no left menu as you would have on a profile page. You can configure a single app to work in both ways.
To edit your application settings, go to your own Facebook home page. Use the search bar to search for the 'Developer App'. Typing in 'developer' should do it - it should be the first result in the App section with around 830,000 monthly users. This Developer app is the window into your own app settings. You need to install it if you haven't already. It's a hub where all the apps you create will be available for you to edit. Whenever you want to edit one of your app settings in future, you click the Developer bookmark that will now be in the left menu on your own Facebook home page.
No. Apps are basically an iframe onto your code. There should be very little if any wait at all. Start with something very simple like spitting out some straight html so you can easily tell if things are set up correctly.
Yes. I found thinkdiff.net to be massively useful in the early days to get my head round the basics and then more advanced concepts. There's tons of examples ranging from very simple to quite advanced. I've just had a quick look around and found this page which should give you a decent head start in getting things moving. Note: I have no affiliation with thinkdiff.net at all - I just found them helpful in the past.
Finally, a request from me; this whole stack overflow thing is new for Facebook developers and very few people are voting up answers they consider helpful. This means new users to SO but experienced FB developers can't vote up good answers and vote down bad ones as we need enough Reputation Points to do so. If this has helped you, please ensure you vote up the answer. Of course if it was rubbish and you're just as lost, dont :D
Hope I've helped in some small way; I know I was completely lost for the first few weeks with FB development and even now there are things that make me tear my hair out! In the end it's very rewarding, but you have to put in the time. Good luck :)

iPhone SDK: Ideas on how to implement a help facility for application

We we wondering what are some ways developers have added a help function to their apps. What are some techniques people have used?
One way we were thinking of is to us UIWebView to display a HTML file with help instructions.
Thoughts appreciated.
I'm using UIWebView right now which pretty much contains all the help in a single page, along with some JQuery things to display popups, etc. But I like the way iCab Mobile (et al.) are doing things which is a sectioned UITableView with each row a separate topic or section within their overall help information (complete with icons...) then in their bundle they have each section in its own html file, organized by localization.
Another thing in my queue for the next release is to provide a dynamic "News" view. The rough idea is as follows... I have on my server a file or CGI where I can place small bits of news I'd like to push out to users. On startup, my app checks for network availability and if present, start a thread to see if anything has changed on the server since last updating the News data. If changes present, post an alert letting user know, and asking if they'd like to read it now. At that point, the latest news is already downloaded and cached, so they can simply read it later if they want, and I won't post anymore alerts until the server file changes again. (And one could add a preference/setting to disable these alerts.)
I'm thinking this would be a good way to let people know that some nasty bug is known and fixed and an update is sitting in the queue, solicit beta testers, promote upcoming features or other apps, etc. I can see where constant alerts everytime I've got something new to promote would get annoying, so having a setting to disable them means the user never has to read them unless they want to. Although some kind of override to warn of recently discovered/fixed bugs seems sensible.
FWIW, the author of Mover+/Mover has just started doing a similar thing, though I think Emanuele is perhaps only showing one Notelet at a time, whereas I envision a bit more of a history (shown in UIWebView) until I decide to age stuff off the bottom of the stack.
I'm using a scroll/page view to show several images containing small notes. Each image then tells the user about the more advanced functions on a specific part of the app.
In my opinion the help should only contain information that isn't a 100% relevant for the use of the application. It should be things the advanced user should use to make more use of the app. It should contain gold for the power users. The "basics" should be so obvious that no help would ever be needed. If that's not the case, I think, you've failed as a developer on the iPhone platform.
(Here's a screen shot from my demo app)
I'm currently creating a fairly complicated app. I'm thinking of doing help as a semi-transparent overlay - help in text form is hard to swallow for users; it's much more helpful to just point at stuff and say "this does that".