• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

How to pass additional variables to viewer page?

hamlesh

Chevereto Member
Hi guys,

I was wondering how to pass additional variables to the view page.

I found the class.handler.php section where ?v= is handled.

Essentially, all I want to do, is be able to pass another variable, without tripping the 404 error.

At the moment, if I call;

http://domain/chevereto/?v=IMGREF -- works fine, I get the view page and image etc

If I call;

http://domain/chevereto/?v=IMGREF&d=SOMEOTHERVAR -- trips in the 404 error page

I've tried all sorts of ways to update the class.handler.php so that the 404 isn't triggered when "d" is passed.

The code to handle what to do with the "d" input isn't an issue, i've got that in place on the viewer page.

Any pointers on how to do this much appreciated :)

Thanks!
 
I'm actually finishing the file manager of the 2.1 release after that I will need to change the handler for ?v. Can you wait a little until I get there?
 
Ok, in the new version the ?v= will be replaced by / meaning that the url should look like
Code:
http://demo.chevereto.com/image/<ID>

And you can add many variables as you want from there using <ID>?myvars or <ID>/?myvars.

To use this vars, you need to capture them on the handler class, in the switch (case "image" for the new version) and grab them using $_GET and then do whatever you want to do it with them.

In the current version this woulnt work but in the new version (2.1) it will be easy so you can do more.

Hope it helps.
 
hamlesh - I hope to have an update for Simpli released, which will incorporate 2.1 and Lautaro's 1.7 Advanced User System, in a few weeks. Just thought that was worth mentioning.
 
Rodolfo said:
Ok, in the new version the ?v= will be replaced by / meaning that the url should look like
Code:
http://demo.chevereto.com/image/<ID>

i know this is a small thing but is it possible for you to change it from

http://demo.chevereto.com/image/<ID>

to

http://demo.chevereto.com/i/<ID>

i dont think many people will complain about the change and it keeps the link as short as possible which is better for everyone
 
inept said:
Rodolfo said:
Ok, in the new version the ?v= will be replaced by / meaning that the url should look like
Code:
http://demo.chevereto.com/image/<ID>

i know this is a small thing but is it possible for you to change it from

http://demo.chevereto.com/image/<ID>

to

http://demo.chevereto.com/i/<ID>

i dont think many people will complain about the change and it keeps the link as short as possible which is better for everyone

I'd rather...

http://demo.chevereto.com/<ID>
 
No, because if we get users you will also want /<Id> for that, or if we get gallery you won't want /g/<id>. So to make things standar image viewer will use /image, gallery or album will use /gallery and user will use /user

Although this is the default configuration, the virtual paths will be seteable on the config. But no nude path will be used.
 
Rodolfo said:
No, because if we get users you will also want /<Id> for that, or if we get gallery you won't want /g/<id>. So to make things standar image viewer will use /image, gallery or album will use /gallery and user will use /user

Although this is the default configuration, the virtual paths will be seteable on the config. But no nude path will be used.

Would it be possible for us to change it to just /<Id>?

I mean, is it impossible? ;)
 
Thing is that you always need standard virtual folders. If we get user accounts, how will be retrieve the user galley or user image? We will use probably /user/gallery or user/i so try to think what will happen if one of this directories is nude. Is totally useless.

I know that you may want shortest URL possible, but to do that you also need a short domain. I mean, the most efficient way to have a short URL is having both domain and path short, I could make a Chevereto short url module (is pretty easy) and if you notice all the people who uses short url (twitter, youtube, facebook, etc) they use a different domain for this. That is not coincidence, that is the most efficient way of doing this.... Simple as that.
 
Back
Top