PDA

View Full Version : Next Image feature Please


TOZ
01-23-2006, 03:04 PM
Is there a way that we could have a next image button or text or arrow to keep looking for the next image posted instead of returning to the main category to view the next picture.
At least until the PRO version comes out. That would help a lot.

allstar
01-23-2006, 11:01 PM
Yea, next and before link ;)

<< - >>

Nitro
01-24-2006, 12:07 AM
You should be able to do it quite easily

in index.php add a couple of lines like:
Content visible to registered users only.

You would just need to find the appropriate place to add the above lines. ;)

and then pop the session url hrefs with the n=(next and prev) variables into the photoplog_veiw_file template where you like ie
Content visible to registered users only.

Seems to work to which surprised me as I just pulled it out the hat. :D

TOZ
01-24-2006, 12:38 PM
Can u explain this a little bit further please

Where in Index.php should we put this ?
$photoplog_prev = $photoplog_file_id - 1;
$photoplog_next = $photoplog_file_id + 1;

Nitro
01-24-2006, 01:47 PM
around line 101 staright after
Content visible to registered users only.

Your line # maybe slightly different I am still on 1.0.6.1

Its not really a complete mod but should do till pro comes out. I dont have the time really atm to try to find the relevant query needed if its there and where to place it and contain the if/elses to make it as it should be. What I mean here is when you get to the end it wont go back to the beggining and if you go previous on n=1 url you will drop out to the category view.

TOZ
01-24-2006, 03:43 PM
Content visible to registered users only.
Does the sessionurl here needs to be rename ? I`m just using the NEXT link here.
Here is what I did so far, i`m also running v1.0.6.1.
This is where I put my codes for the Index.php
Content visible to registered users only.
And here is an example of the my site:
http://www.sffba.net/forum/photoplog/index.php?n=213

What am i doing wrong ??

Nitro
01-24-2006, 06:01 PM
Forgot a step sorry :)

You need to add the 2 variables to the page output function globals in functions.php (I added them in the same line as $photoplog_fileid

so that line looks something like:

global $photoplog_fileid, $photoplog_prev, $photoplog_next, $bla, $bla....;

As I said dont expebt wonders from it it is not going to jump to the next image in the category or the next users images its just a simple +1 or -1 on the =n

The fancy stuff is a lot more work.

I cant view your site unregged.

You can see this working tho non regged can view atm
I just added it their till the pro comes round. :)
http://www.madforit.org.uk/portal/photoplog/index.php?n=13

allstar
01-29-2006, 06:15 PM
Please reply with the complete text.
I don't understand the pieces here.

I installed the code, but when the id for "back or return" is not available,
i receive an error mod message.

that sucks

Nitro
01-30-2006, 03:58 PM
Yep your right it isnt the best, prev link when on a n=1 should drop you to category veiw but when n=lastpicid and next is selected you will get a "no picture or needs moderating error message".

I did give a quick if / else a go but I cant seem to find the right syntax or the query I found isn't relevant to it, like I was hoping at the time. I have not had time to play more with that either. Mys suse box is not behaving 100% after updating to 10.0 OSS and I really want to get that sorted, amongst other things. I will hope to have a way to go round the clock both ways sometime tho even if pro comes first.