Modify Profile Avatar url in DNN - themes

I run DNN 9.2.2. I have wrestled with this with two Themes, the default Xcillion and the easily available "dnnContra". I am logged on as host, hence the userId of 1 below.
Clicking the Profile Avatar displayed in the top-bar takes you to
http://exanoke.com/Activity-Feed/My-Profile/userId/1
We wish to modify the URL to
http://example.com/Activity-Feed/My-Profile/ctl/Profile/userId/1/pageno/2
I cannot detect where the URL is generated. I can't find any place to configure the URL. Since it has a userId that depends on the user who is logged on, I presume it depends on JavaScript. Both themes utilize bootstrap, probably bootstrap 4, so it may be in there.
Might anyone have experience with this?

To do this the best way, you would want to duplicate the user skin object and modify it, that's pretty involved though.
To do it quickly, hackish, you could add the following javascript anywhere to your page.
<script>
$( document ).ready(function() {
dnn_dnnUser_avatar.href += "/pageno/2"
});
</script>
You could add that directly to the skin itself, or you could add it into the MODULE settings (header or footer) of any module on the page. If you want it on EVERY page of your site, I recommend you put it into the skin.

Related

Cannot Load from URL in Kendo Panel Bar tab

I need to load the content of a new tab from a URL but I cannot get this to work
I need the same kind of thing as would have been done with an IFrame before HTML 5
The website I am going to has no link to the hosting site whatsoever
I have tried a simple version first
#(Html.Kendo().PanelBar()
.Items(panelbar =>
{
panelbar.Add().Text("Test").LoadContentFrom(#"<object data='https://www.google.com' type='text/html'/>");
})
)
Has anyone been able to do this?
I am using the MVC wrappers as you can see
Paul
Firstly, you need to specify a name for your panelbar, otherwise it won't work. With regards to LoadContentFrom you should simply supply it with a url. Including this html markup makes no sense. So your code needs to look like this:
#(Html.Kendo().PanelBar()
.Name("Test")
.Items(panelbar =>
{
panelbar.Add().Text("Test").LoadContentFrom(#"https://www.google.com/");
})
)
However, this is still not going to work, because the request to google.com (or any other https site without the proper access-control-allow-origin header) will be blocked by CORS.
So this scenario may or may not work, depending on the external site you want to load from.
Furthermore, if you do not have a CORS issue and you are able to load the contents, this is still not going to work like an iframe, because you will receive only HTML, which will likely have broken images and no CSS. That's because you will be placing this html in a document, which has no access to those resources, unless they are referenced by domain name. You would have to search the entire html you receive and replace any image, css, and javascript references... and that still might not provide the same experience as an iframe.

Magento Block for in CMS pages to display links associated with that page (set in admin)

So I would like to be able to add a block to certain CMS pages, which would display links for that page.
I am thinking it will use a common (custom) template, to display the links on each page in the same manner, but I need to be able to set the links in the admin side.
I had initially thought about using a widget. which seems to make sense, and wouldn't be too hard to be able to edit in the admin side and add to a page.
But I am not sure how I could create a widget which allows for the addition of multiple links, tied to that page.
Ideally, I could add a block in the cms layout xml, perhaps check if the url path is correct, and displays the links for that page in a block.
As I write this, I realize I am not sure what the best way to accomplish this would be.
I would rather not have it be editable in the content. But I am not sure how else to make it easy to add links to a page.
Is there some way I could create a module or something where you could choose the page in the admin side, set as many links as you want (with label and URL). and then on that page, the block would load the links into the block template?
Any direction, or even a place to start would be VERY helpful. Thanks!

Load Wordpress page in a div without reloading page and while changing url

I am coding a website for a client and they requested that because they have so many sidebar pages under one parent, that when the page link is clicked, it loads in the same area every time without the page reloading. They also requested that the URL changes on reload and that you can visit each page by going to that specific url. Unfortunately, I don't know how to do this. I have found a lot of tutorials and snippets that are half way there but they don't offer the exact functionality.
For example, if you go here: http://lookseewatch.com/independentinsurance/commercial-insurance/
You'll see a long sidebar of different types of commercial insurance they offer. When you click on "Automobile," or any link for that matter, the page should be loaded into the div area on the right of the sidebar. The url then should change to reflect this change to http://lookseewatch.com/independentinsurance/commercial-insurance/automobile/. All of these pages are separate and dynamic in Wordpress.
Can anyone offer me some assistance? This is currently how the sidebar is being generated:
wp_list_pages('title_li=&child_of='.$post->ID.'');
Let me know if you need any other code from me or have any questions about the functionality.
Thank you!
This is kinda complicated. There are a lot of ways of catching user events, stopping default behavior and running custom code over it. For exemple, you can listen to anchor clicks and return 0 to not load their links.
But if you change URL in browser address bar, as long as I know, a JS can't control it, because it's outside of a webpage domain, and controling browser components from an external webpage would open a lot of security flaws.
This looks like they wanna avoid banners loading to count less hits :P If performance is the issue, first of all you can use a cache plugin, that will store in HD all DB queries, and use those files in future pageloads instead of making new queries.
You can also build a full sidebar into a PHP variable, cache it in HD and read from there, instead of building the whole code everytime. It will be like adding static HTML snippet.
This can be done with a technique called pushstate combined with AJAX. There's a great jQuery plugin that's called PJAX that implements this. http://pjax.heroku.com/
I have just published a plugin called WP-PJAX that makes to whole wordpress site PJAX driven. I'm not sure if this solves your problem, but it might be something for you.
https://github.com/pelmered/wp-pjax

How can I do a Directory Listing of ebsites with Ez?

I need to do a specific task with Ez Publish but I don't have a clue on how to do it.
What I need to do is a list of Websites(Website directory). I will need to add basically two kinds of data:
Website Name
URL of the website
Then, when I click in the website link it will redirect to a page where I have the IFRAME with the link(URL of the website).
Can someone give me a clue about how to do this with Ez Publish? I'm a beginner.
Best Regards,
You haven't said anything about where you're getting the list from, so I assume you have the list already and just want to know the correct way to input this type of content.
Login to the site admin area, browse to the part of the site you want the list to be at (usually a folder). You'll be adding content items of type 'link' below the folder.
Select the 'Link' content type and click on the 'Create' here button. Enter the content (including the link URL to the page containing the IFRAME) then send for publishing.
I'm assuming the sites are your own, since many sites now take steps to prevent others placing their page in an IFRAME.
If you want this page to not just link to the iframe page, but to actually display the iframe content, then you'll need to override the default link template (copy it and tell eZ to use your version instead) and add a bit of html for the IFRAME.
If you're the main user imputing this content, you could also just allow eZ to accept literal HTML in the main description text areas (XML Block) and just paste in your IFRAME html. Ugly but quick to set-up.
You should be able to find many examples of entering literal html at the community web forums http://share.ez.no/forums
You should create a specific class for that with the two fields you need.
One for the name and another one with the URL.
Then you'll just have to make an override of node/view/full.tpl for your new class Where you will display the name and an iframe with URL that have been typped in your class instance.

Prevent Audio Player from refreshing while page change

I'm creating a website in wordpress. I have a music player in it as its for a music artist. But I want the player to continue playing while the users move through the website. I dont want to use iframe as i want the url updated so the page can be bookmarked. Or is there any way to update the url and use iframe?
Somebody on the Wordpress forum asked the same question.
The best way (technically) to do this is indeed to use a CMS that supports surfing the site without page-refreshes, so using AJAX, as #jonny suggested.
jango.com seems to do this as does another site I can't remember.
If you load every page via AJAX, there's probably gonna be a drawback if you care about search-ranking .
any way to update the url and use iframe
maybe you need something like this
main.html
<script type="text/javascript">
function change_parent_url(url)
{
document.location=url;
}
</script>
player.html
after each click (how?): parent.change_parent_url (new_url_here);
I am not sure, but I've seen similar, iframe approach on weborama.ru:
look for window.location=, maybe it helps
If you change the URL fragment (the part after the #) on each page change, the URL in the address bar can always be bookmarked. If you do this with a frame (probably the easiest way), every page load would update the URL fragment of the parent document. If an incoming link has this fragment set you open the frame not with the homepage, but with the requested content page.

Resources