How to show Sharepoint Site Usage Statistics in a page? - sharepoint-2007

What's the best way of showing site usage statistics in a page? I know I can view the stats from /_layouts/SpUsageSite.aspx and from designer also, but if I want to show this information in a customized way for a target audience, how can I show this data in a page? at least I need to show "recently visited pages".

You need to use the SharePoint class for return reports. See the SPUsage class on MSDN (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spusage.aspx)

thanks all but I solved my problem quite easily, I simply used
spweb.GetUsageData(SPUsageReportType, SPUsagePeriodType)
didn't know SPWeb has such method, its enough for my requirement.
thank you #Chris SPUsage is also one solution I think, I'll try it next time

From the SP main page, go to the Site Actions, Site Settings, Modify All Site Settings and then select site Usage reports under the Site Administration column.
Once the page loads and shows you the stats. copy the url out of the browser and then ad that to a List or annoucements and then add that to your page as a web part with a hyper link to the stats report.
you could also create a new web-page and then insert an I-frame object with the stats report url and then link the new page to the parent site using a List.

Related

Joomla - Wrong url path from google results

I have a strange problem in one Joomla website.
If i access from homepage and then navigate into the site it works correct, but if i go in some internal page from google results it shows uncorrect page layout, because the url is not correct.
This is the correct url
Correct page from homepage
and this the uncorrect url that Google finds Uncorrect page from Google
in this second page is showed rating module (that i never used) instead of an article, as you can see in links.
Someone can help me?
EDIT: I'm using Joomla 2.5 version. Every menu item is category blog type, and must show all articles of one category. Each category have 2 articles. In the uncorrect link seems that it access to single article, adding the rating that i have hidden in each article
Which version are you using?
if you can turn on SEF option in the global settings in joomla admin. Then you need to make sure all your articles are in menus. then if you link them on different pages it should keep the url the same.
The way you have it at the moment with all the x=123&... get params pages will show for what ever ids you change the menu to.
The reason you are seeing an uncorrect layout is the two different Itemid parameters (the right url has 127 while the wrong one has 104). The rest of the difference in the urls will be ignored by Joomla.
Solution: Find your menu item with id 104 (look at the menu ids on the right of the menu items view), then check which modules appear on the page from there. There may be modules in non-visible positions.
One of these modules is publishing the links with the wrong ids. If it's a Joomla core (like a search module) you can usually force the Itemid either in the module or in the component's configuration. Else you need to fixsome third party code.
Only once you have solved the multiple-itemid should you turn on SEF, otherwise you'd get the same problem only more difficult to trace.
sh404 could help you with this, I'd give it a try on a test site to see if it gets you out of trouble faster.

Linking to a non-entrypoint GWT page

Is there a way in GWT to make it so that external sources can link to pages that aren't EntryPoints and have not yet been visited?
The end goal is to allow users to provide URLs to other users that link to a page that is not an EntryPoint. An example is how the GWT history feature works, where after you visit a page (such as http://<ip address>:<port>/MyEntryPointClass.html#NotEntryPointClass), even if you click to a different page and then enter that URL into the address panel, it takes you back to that page. However, if you've never visited that page before, it just takes you back to the entry point page. I have only been able to find solutions where a GWT page links to an external source, and not the other way around which is what I need.
You can use Activities and Places pattern. In your entry point class add:
historyHandler.handleCurrentHistory();
and it will take your user to the default place if no place is specified in the URL, or to the place set in the URL.

content query web part to display content from another page

I have a need to render content from another page using a content query web part. I've found several examples on how to accomplish custom fields using common-view-fields but nothing specific on how to query page content from another page.
Is this possible?
Thanks,
Eric
"Content Query Webpart" is typically used for aggregation - you have a lot of pages in your portal and you want to create a page which summarizes the headlines or some other properties that every item in your portal has.
In your scenario, as far as I understand, you have a page in your portal and you want to create another page, which displays the same content. In this case the "List form webpart" or a "data view webpart" would sound more reasonable.

How-To get private pages being crawled by google

How can i get private pages of my web site being crawled and indexed by google ?
maybe it's not very "conventionnal", but i want my private page "links" displayed in google index, but next require a registration to display the page.
EDIT: Based on the addition of "maybe it's not very "conventionnal", but i want my private page "links" displayed in google index, but next require a registration to display the page." To the question:
You can check the User Agent in your php code to basically allow google to see pages if it was a registered user (google's user agent is "Googlebot/1.0" and you can search to find user agents for other common engines).
However, this behavior is specifically against google's rules and they can and will remove your site from the index if they catch you doing it. Their policy is you should not treat googlebot any differently than you treat any random person who visits your site.
(Original Answer) One way is to use a sitemap to show google how to find all of your pages.
In general, and even in the case of sitemaps, if the content you want indexed is not linked to from a page that can be found through the "root" (/) (i.e. there is no way for the public to find it), then it probably won't get indexed. The only way to get it indexed is to link it in someplace.
The question is though, why do you want your private pages in google anyway?
They'll get crawled if and only if they're publicly accessible and your robots.txt file allows it. That's pretty much all you need to do.
Are you asking how to get Google to index your pages?
There are a couple of ways. You need to ensure that you have SEO'd, or Search Engine Optimisation, the pages properly with title text and description key words in your meta data.
You can also submit your site to Google, it's a free service, and it'll be placed in a queue of things that Google will index. May take some time though.
By far the best way to get your pages indexed is using the meta data in the pages themselves.
Google will only index what is
linked from somewhere already in Google's index
accessible to its crawler via normal (unauthenticated) HTTP
It will also
make the contents available in search results to anyone.
This may conflict with your idea of a "private" page.
I'm going to assume that all the other previous answerers are misunderstanding you. As I read it, you aren't asking how to get Google to index your pages, but rather how to get a list of all the pages that Google currently has already indexed on your site? If that is true, you should have a look at the Google Webmaster Tools.

How to show a list of sites the current user can access?

I'm working on MOSS 2007 and I want to build a sharepoint webpart that can list all the sites (in the same SPfarm) visible to the current user. What I can think of is:
Use FullTextSqlQuery class to search for the sites, but is it possible;
Build an external application that crawls the user-sites information by using the Sharepoint Object-Model. The webpart can then use this information.
Is there any simple solution?
Any idea will be appreciated. Thanks!
Please take a look here: Talk to SharePoint Through its Web Services at "Example 3"
You'll need to write some managed (.net) code.
SharePoint creates site maps by default. Unless you have turned this off, you can get one from a site by appending /_layouts/viewlsts.aspx to the site URL.

Resources