Redirect from Web query open agent on Lotus Domino? - redirect

Does anyone know a way of redirecting to another webpage from lotus domino web query an open agent? The print statement does not seem to work. A possible workaround would be very appreciated!
Something on that subject can be found here but it seems kind of flaky like this
link.
Can it be done without JavaScript and major redesign of document form?
Thanks in advance.

You do realize that the 4/5 forum is almost a decade out-of-date, right? If you're using a more recent version of Notes/Domino, I'd check the 6/7 forum (or even the 8 if you're on that release, since it's so different); here's the search results for "webqueryopen redirect"; there are a lot more possible answers.
Notes 6/7 forum results
The simplest answers to your actual question are here and here.

Better to wite to 'location:' header directly, as avoids Javascript and meta-tags.

This is from one of the responses on the thread you pointed to and should work fine - have the WQO agent simply write to a hidden field on the form. This will do a client-side redirect, so you'll get two trips to the server.
You could use your WQO to set a field
on the document called redirect. Set
the field to text and hide it from
everything. HEre's what you put in the
field (with your WQO agent):
location.replace('http://www.website.com');
In your HtmlHeadContent, put this
formula:
"" +
#NewLine + redirect + #NewLine +
""

A line of code in WQO agent does the trick, but note it still loads the page before the redirect:
Call s.Documentcontext.Replaceitemvalue("$$HTMLHead", {<meta http-equiv="REFRESH" content="0;url=http://www.etfos.hr">"})

in your agent, simply do the following
print |[| & requiredURL & |]|

Try to see if you really need to open the document instead of running an agent and pass the params in the Query_String
I think that wqo cannot redirect to another page as it will end up redirecting you to the document you either opened or are creating. I may be wrong but yesterday I was trying to either do one thing or the other based on the params I was passing to the OpenCorm url command and it seems that although it is running the agent, the pw.println() command doesn't behave the same as if it was a WQS agent.
If you don't need to open a document, try running an agent and pass the params to it

The proper way to do it is to have one print statement with the URL you want to redirect to in brackets. This will generate a 302 REDIRECT on the server.
Example code:
%REM
Agent redirect
Trigger: On Schedule - Never
Target: None
Security Level: 1
%END REM
Option Public
Option Declare
Sub Initialize
Print "[http://www.ibm.com]"
End Sub
Some people have suggested Meta Refresh. This is discouraged by the W3C. See the following link:
http://en.wikipedia.org/wiki/Meta_refresh#Usability

Related

How do relative URLs work in Sinatra?

I am hosting my Sinatra application using Apache with Passenger. It's hosted within a subfolder -- meaning, my main site is example.com, my application is at example.com/popcorn.
So I have a get '/' route, and that works fine. The problem is that my view includes a HTML form that makes a post request to upload, and the post '/upload' route isn't handling it. Instead of example.com/popcorn/upload, it's trying to get example.com/upload.
So I figure okay, not the ideal solution, but for now I'll hardcode the form action URL. But that doesn't work either -- making the action popcorn/upload fails too. This is where I get a little baffled, and my Google-fu was weak, I couldn't find help there.
Maybe I could have some kind of Apache rewrite rule, but is that the correct solution? Am I missing something? I would really appreciate a tip here because it feels like I've messed up something very simple and it's really bugging me.
You probably want the url helper method. That takes into account where the app is mounted on the server:
url('/upload')
The above code will evaluate to something like this:
http://example.com/popcord/upload
Inside your app you shouldn’t need to change anything, this will be routed to the existing post '/upload' handler.

Zend Sessions not stored for step3

I have used zend session as bellow..
$test = new Zend_Session_Namespace('test');
$test->test = "test text";
But when i move from one step to another step its working fine and echoes value Not on step3. even i tried using $_SESSION direct (because am desperate this to work ). But i have same problem that session not stored. Site seems almost broken when i use mozilla and IE. Not only in my PC But i have tested in multiple systems.
Tried clearing cookies, used cookie enabled browser only.
SO please suggest me what could be the posible problem in doing above. even i have inserted zend_session::start();
Thanks in advance,
Sanjeevk,
You haven't provided any useful code for what you are trying to accomplish, so I'm going to guess.
I have encountered a problem similar to this as well. My issue was simply trying to persist a page number from the paginator so I could perform an operation on a record and then return to the same page in the previous action.
The problem I was having was that the controller would overwrite the session data every time I called the action (page refresh), so while the page number would persist to other actions as soon as I called the original action the session would be over written and the page would reset to 1.
My solution was to get the page number from the view script and then feed it back to the controller later.
//the view script
<?php $session = new Zend_Session_Namespace('page'); $page = $this->paginator->getCurrentPageNumber(); ?>
so now when call $session->page anywhere in my controller/actions the data is still there and doesn't overwrite until the view is actually rendered, which is exactly what I needed.
You may be encountering something similar. Because of the way PHP and Zend Framework operate you may be inadvertently over writing your session data.
If this doesn't help, please provide more information and maybe an answer can be found.
Hope this provides some help or at least hints.

CodeIgniter send()) fail

I am learning how to use code igniter and following tutorials. As this is my first time to use MVC, I'm having some trouble implementing the send function. I am doing a tutorial on how send a newsletter sign up form.
For some reason when I hit submit with or without the info, its giving me a 404 page not found with the /send extension. Is there something I'm missing in my config file?
Here is the code
Thanks in advance.
Is not send that is failing but you missed something in your config.
http://codeigniter.com/user_guide/general/urls.html
You should set up your .htaccess according to the guide above.
Did you setup the CodeIgniter rewrite rules in your .htaccess?
Apart from the htaccess possible problem, there are a couple of things wrong in the file you posted:
1) the html <title>HEY<title> before the php class, but I hope that's a typo, right? you don't have html in your controller file, right?
2) You're getting the POST variable wrong; or better, you're confusing and mixing things.
Instead of
$this->input->$_POST('name'); //which is also sintactically wrong
should be:
$this->input->post('name').
The input class already does the retrieving of this superglobal. And unsets them in favour of its own.
3) To use an attachment, you need to call
$this->email->attach($filename);
You just declared a variable and nothing else.
4) What is $this->email->set_newline("\r\n"); ?
I don't see this function in the email class...You need to use a config file for this, or pass the value on library's inizialization:
$config['newline'] = "\r\n";
$this->email->initialize($config);

Apps>Menu>Basic 405 Method Not Allowed

I am hosting my pages on my doamain. I put the following info. When I go to view the app it shows 405 Method Not Allowed..Not sure what I am doing wrong.
*
The first page load a APP makes is a POST request.
Seems your server could be rejecting them.
Its worth checking the server side error log for further information.
Indeed, it will most probably be a setting on your server. I had the same problem, my server didn't allow POST method on .html pages, changed my canvas page source to .php and all works fine now.
If you can look at your apache logs, it will provide a more clear error that we can help you debug with. Though a 405 error typically signifies a problem with the server and usually stems for a POST request.
I have made the mistake 2 times of creating my site in html instead of using a scripting extension. For example, if you are running on a Windows server and coding in Visual Studio, it is tempting to just create .htm or .html files. However, most web servers will not allow a POST operation to these pages. Instead, create .aspx pages, which will still allow you to use the same exact static HTML and JavaScript. This solved my problem in both cases.

How can I download Yahoo Groups?

I want to download some Yahoo Groups (files, photos, messages, memberlist) and I've found these scripts:
http://freshmeat.net/projects/grabyahoogroup/
http://sourceforge.net/project/showfiles.php?group_id=62034
I've downloaded ActivePerl and the needed modules from CPAN (nothing fancy; they're very easy to find). I've managed to install them, but when I run the script I get an error after it tells me that I've successfully logged in:
"Use of uninitialized value $cells in pattern match (m//) at yahoogroups_files.pl line 244, line 2."
I'm guessing that Yahoo changed the layout of the page or something, but I'm not able to update the script myself. I'm a newbie when it comes to Perl and understanding the way Yahoo generates the pages, I only know some basic C++. I want to mention that I'm not lazy, I'll try do fix it myself but I need your help: hints, advice, anything.
PS: I've contacted the author, but he isn't willing to update the scripts.
You would need knowledge in the following fields:
use of an html parser
http knowledge ( get/post/head )
web scraping
I suggest you focus on WWW::Mechanize since it's capable of all these things ( and more )
EDIT: another solution ( that doesn't need programming ) , is this: login with your browser on yahoo groups, store the cookie, and then run wget , passing the stored cookie as a parameter. This way you'll get the task accomplished very fast.
Find your browser's cookies.txt file on your harddrive, and then call wget like this ( if I remember the commands correctly ) :
wget --load-cookies path_to_cookie_file -r -w 60 website
The full man page can be found here
EDIT2: Another option is to use WebDriver to automate firefox. You can use this article as a guide on how to accomplish this.
By the filename I'm assuming you're using Yahoo Group archiver found here: http://sourceforge.net/projects/grabyahoogroup/
I ran the files script against the SubEthaEdit group and it works great. All of the files downloaded without incident.
Looking at the code it seems to barf while processing an html table in a while loop if $cells is empty.
Considering the code did work when I tested it it's possible there's something going on with the listing of that group's files. You'll want to try outputting $content and figure out where and why the regular expression on 243 isn't able to process that html.
EDIT: If you don't mind posting the group this is happening with I'm sure myself or someone else here can try it out and troubleshoot on their own. It's tough to pinpoint what's up when the issue can't be duplicated. Also, try the same group I did and see if it works out for you. Certainly something up with the group you're trying if that works.
Dunno if it will help you, but here's what I did to get the message-download working:
http://sourceforge.net/forum/forum.php?thread_id=3283915&forum_id=209170
(I only used message-download, I didn't look at file-download)
Was tinkering on this a while ago to backup my girlfriend's group messages and files from uni. Upon debugging on the latest scripts I've found out that there seems to be a bug on group_domain declaration (theres also a group declaration bug that i've found on yahoo2maildir.pl of the same project, see $request)
($group_domain) = $url =~ /\/\/(.*?groups.yahoo.com)\//;
in this case, i've overwritten the $request var under the function sub download_folder() with
from <br>
$request = GET "http://$group_domain/group/$group/files$sub_folder/";
<br> to <br>
$request = GET "http://**groups.yahoo.com/group/$user_group**/files$sub_folder/";
grabyahoogroup works well in the latest edition, which can be found at the svn repo:
http://grabyahoogroup.svn.sourceforge.net/viewvc/grabyahoogroup/trunk/yahoo_group/
The version at sourceforge.net/projects/grabyahoogroup/files/ HAS BUGS AND DID NOT WORK FOR ME.
I've been looking for a tool that collects messages/conversations from Yahoo Groups!. I finally found this tool that converts your Yahoo! Groups messages into MBOX format after struggling to try to make my own and searching everywhere on the internet.
Download tools
Both of the following are Google Chrome extensions.
Chrome Extension to Download Members posted by Sam Hobbs (2015).
Chrome Application To Download Messages posted by Mark Fletcher (Jan 2016).
Plain string to Base64 binary data
At some time past September 16, 2010 (at least for me), the messages retrieved are no longer plain text and instead Base 64 binary data (ASCII). Using this swiss converter tool can allow you to read the data as it is.
Sample content from the MBOX format
VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4=
Sample result after conversion
The quick brown fox jumps over the lazy dog.
for cause, as of 2019/09
https://github.com/csaftoiu/yahoo-groups-backup
.....