I am using coppermine gallery, the only suggestion so far, on their help forum, was to inquire with stackoverflow. Problem - when you click on one of the Categories on main page It goes to "No image to Display". I would like it to go to something like "You must be logged in to view these pages" or something like that. The coppermine forum suggested maybe redirects in an .htaccess file? Is that the best way? I think the easiest way to explain is this: When you Click on Coudy here:http://stalag13000.net/Gallery/index.php it goes to "No image to display" but I would like it to at least go to here:http://stalag13000.net/Gallery/login.php?referer=index.php%3Fcat%3D2
I did see some posts on .htaccess but I am far from knowing if any of that could or would apply to my scenario,
Thanks for any help or direction,
yamiacaveman
If you are going to display info only to people who are logged in, you would check in the
$_ SESSION
variable to see if they are logged in or not. If they are not, you would then direct them with php to the login page.
header('Location: /login.php');
header location with php
I like Ollie Ford's suggestion. You could open a modal over the current screen, ask for them to login there and then, on success, you could thank them, close the modal, and show the content on the page.
Related
I'm planning on trying to see if it's possible to make a website in Godot(Yes, I know I shouldn't I just want to try just to try). I thinking about and looking over the features I need and I have one problem.
I just need a way for a person to press a button and get redirected to my itch games. I don't care if it creates a new tab or changes the current tab. Thank you for any help.
If you dont export to web you can call
OS.shell_open("url")
Sadly this does not work in an html export. A solution I found for myself is the JavaScript Interface. As the name suggested it allows you to execute Javascript.
So to open a URL you could connect the pressed signal of a button to something like this:
if OS.has_feature('JavaScript'):
JavaScript.eval("""
window.open('https://google.com', '_blank').focus();
""")
This will open a new tab in the active browser.
I also found an article on the godot site, basically asking the same question (https://godotengine.org/qa/46978/how-do-i-open-richtextlabel-bbcode-links-in-an-html5-export). Here they tried to use an RichTextLabel with BBCode.
The solution did not work for me, when I tested it, though.
As pointed in the comments you can try OS.shell_open, for example:
OS.shell_open("https://example.com")
That only works if it is not an HTML export.
Your other alternative is to eval JavaScript, for example this navigates the current tab:
JavaScript.eval("window.location.href='https://example.com'")
Which only works if it is an HTML export.
Since that only works for an HTML export and the other does not work on an HTML export... If you need both you can do this:
if OS.get_name() == "HTML5":
JavaScript.eval("window.location.href='https://example.com'")
else:
OS.shell_open("https://example.com")
See also Close a game in Godot.
I am newish to coding websites, I've done it before but I want to start getting more advanced. And I need some help, I am attempting to make a website that looks like this:
http://imgur.com/ALdNXbH
Ihave the logo and can do any gfx.
Ok let me give a summery, I want to have the navigation bar around the logo likeep shown, and the quick news could be a feed from a forum or something and I would like to have the navigation bar on all pages not including forum.
I am not asking for you to code it for me but simply just help and general tips.
Thank you very much for reading,
Nick
You should have the navigation at the head of every web page. Think of your users!
A client wanted me to add a page to his Modx website. I am only a Joomla/Wordpress guy but I figured I would take a stab at it.
Here were my steps:
I clicked "new document", gave the page a template, a name, a parent, then pasted in some dummy text and hit save.
Now, all of my links look like this: http://www.myurl.com/modx/contact.html
edit: Actually that is how they are supposed to look according to google. They just simply are not linking to the page any longer.
My blog link still looks like this: http://www.myurl.com/blog (and it is the only link on the page that works)
I cannot delete the resource that I created under any circumstances. Modx just crosses it out in red and there is no option to permanently delete it, that I can find.
edit: Got that part solved... :)
Thanks for your help, I am trying to fix this before the client realizes it is broken.
You specified base tag in head? Like this: <base href="http://www.myurl.com/modx/" >.
And to fully remove the resource you need to press the trash icon on top resource panel tree.
Getting rid of the resource group assignments sorted out the issue, and the site is now fully accessible again.
strong textI have a web page that is containing several links on it, and when we click on any link it redirect to another page that is also containing several links, like wise all links have several pages.
I want to click on all the links and when i click on first link script should click on all the links of redirected page and so on.. when it done the clicking on the links, again second links link of the first page should get clicked like wise for links.
Please any one can help me on this, I have developed the script by which I am able to click on all the links of main(first) page but not getting idea how to do that for sub pages of the application.
Please revert ASAP, its very urgent.
You just have to implement some recursive function like this:
def crawl(link)
browser.goto link
# gather all links before navigating to next link
all_links = browser.links.reduce([]) do |memo, link|
memo << link if link.href =~ /appdomain/ # do not visit external links
memo
end
all_links.each do |link|
crawl link
end
end
crawl "http://appdomain.com/"
This is untested code, but it might work :)
Also this code does not avoid clicking link to same path twice from different places - there's room for optimization.
It might be that you're using wrong tool for your job - at least it seems so when reading your question. What is the original problem?
I am currently developing a site which is not supposed to expose its developer magento platform(Sorry about that ).
I thought the wappalyzer(Mozila addon),GTmetrix site is finding the cms names by its html format but when i saw a empty white page with that tools it still shows me like am using Magento(there is nothing in the source view - its white page), so now how they are finding that am using magento. Any idea about hw they are working? I checked headers but there nothing specially mentioned as magento. Same goes with wordpress/joomla - simply wappalyzer(Mozila addon),GTmetrix finds the site platform even there is no html source.
So I guess something with in header(i might missing something) or what it can be? please advice. Attached screenshot of it.
Thanks in advance
You can view Wappalyzer's source code: (Ctrl+F Magento):
https://github.com/ElbertF/Wappalyzer/blob/master/share/js/apps.js
Most likely Wappalyzer picked up on the "Mage" JavaScript variable. You can see this by clicking the DOM tab in Firebug.
They are finding it using the words like mage,varien,magento. If it finds any of these words inside css/js file class,#id,inside comment then it found it as magento.
Also gtmetrix does one more step , like it is checking the css/js url path - if it fins the url like skin/frontend then it says it as magento.
Dont forget cookies...
I use FireBugs. Go to main menu -> Cookies
There is frontend in cookies.