![]() |
first of all my 'beginning' code might be a bit different, my board is really hacked up. anyways,...
to get a 'Next Page >' button in your multi-page threads, so people dont need to remember what page they're on: in showthread.php replace Code:
while ($curpage++<$totalpages) { Code:
while ($curpage++<$totalpages) { to make your template.php create instantly useable templates from the form (instead of having to go into global.php and register them) open /admin/template.php and find Code:
$DB_site->query("INSERT INTO template (templateid,title,template) VALUES (NULL,'".addslashes("$title")."','".addslashes("$template")."')"); Code:
# added template code Code:
eval("\$fivelinks = \"".gettemplate("fivelinks")."\";"); Code:
require ("admin/rattemp.php"); anyways, thats all stuff ive been meaning to do for 3 months and never got around to it, so i figured maybe i'd share it :o also im not really a mega-php programmer, my bag is perl, so if you find my code is weird (or just plain bad) thats why :) [Edited by Ratorasniki on 01-01-2001 at 07:45 PM] |
my bad, old ver. to get the next button replace it with
Code:
while ($curpage++<$totalpages) { |
thanks for the code, it workes perfectly, but can you add previous page to the hack?
|
Quote:
Code:
$twrat_prevpage = ($pagenumber)-1; |
not exactly,
first of all you didnt change it to perivous page (so both of them are "next page", and second, the previos text shows before "This thread is X pages long:". please fix that. |
Code:
$twrat_prevpage = ($pagenumber)-1; |
that is not what i wanted, what I want is something like this:
< Previous Page 1 2 3 Next Page > now it is: 1 2 3 Previous Page > Next Page > |
Why don't you look at the code a little and fix it.
Sorry but while I try to help, I am not at your beck and call and my time is precious. The next time you need help, why don't you ask a little more kindly and without the demanding tone? |
sorry if i didnt ask kindly, I really aprreciate your work.
I know nothing about php but ill try. thanks anyway. well maybe just one more thing, can you tell me how to use this "<" char? [Edited by Scaramanga_gold on 01-02-2001 at 02:57 PM] |
If you look at the source of this page you will see that you need to use "<"
|
thanks freddie!
|
Code:
$twrat_prevpage = ($pagenumber)-1; eval("\$pagenav = \"".gettemplate("showthread_numpages")."\";"); and $curpage=0; while ($curpage++<$totalpages) { |
you were close but I already find it out..
the full code should be: Quote:
[Edited by Scaramanga_gold on 01-03-2001 at 07:12 AM] |
Glad you figured it out. Now you are on your way to becoming a successful vBulletin Hacker and have a sense of accomplishment far greater than a mere copying and pasting could have given you.
Congratulations. |
Well, I dont think Ill become the greatest vb hacker of all times but I might fix some problems with other ppl work, that because I know just NOTHING about PHP but i have a good logic and I know C++.
thanks, and have a happy new year. |
All it takes is knowing C/C++ and you are 75% there.
|
hey, i came from Perl :P
i still like it better then c/c++, although to be fair i only know enough c/c++ to do what needs to be done, so to speak. im starting to like php but i need to work with it a lot more, i think before i can really pass judgement. still, i find myself using perl for most anything besides the vb on my site. to be honest im surprised that worked for anyone else, like i said im a php newbie, and my version of vb is so hacked up its barely recognizable from the code standpoint. we ran a bunch of optimizations, added 'real' private forums (w/ passwords, etc), and all sorts of neato stuff. anyways, im glad it worked for anyone who tried it. |
My forums are really private. :) Those without access can't even see them and I control all access to them. :)
|
sure they cant see them, but by default (in the version i have installed, which is like 1.1.3 i think - im scared to upgrade w/ all my hacked up shiznit) you can change the forumid and get in w/ no checks.
|
Quote:
[Edited by Ed Sullivan on 01-03-2001 at 07:22 PM] |
i didnt test or fix that particular problem, so no im not sure exactly what the circumstances were, sorry.
|
Quote:
http://sitepointforums.com/forumdisplay.php?forumid=14 I got: Quote:
Quote:
|
All times are GMT. The time now is 08:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|