vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   rewrite 3.0.3 code to 3.8.2 (https://vborg.vbsupport.ru/showthread.php?t=212625)

ageurtse 05-01-2009 06:08 PM

rewrite 3.0.3 code to 3.8.2
 
Hello i have a php file on an old forum 3.0.3 and i wan't to upgrade the forum to 3.8.2 but on the testing server the php file won't run.

i searched a bit, but in 3.8.2 there is no
PHP Code:

/globalize($_REQUEST, array('perpage' => INT'pagenumber' => INT'showthumbs' => INT'userid' => INT)); 

how can i solve this first problem.

below the whole code is there.

edit by Lynne: code removed

ageurtse 05-03-2009 10:37 AM

nobady who could help me with this

ForumsMods 05-03-2009 02:25 PM

I saw in you thread that you are doing it. Now, I am busy doing some jobs, when I finish I will help you. Or if you are hurry, you can post in Requests For Paid Services

Change $DB_site to $db

ageurtse 05-03-2009 05:20 PM

i hade do some rewriting already done ,the $db_site i translated in stuf i translated $vbulletin->db.

$post do i need to translate that ?

Lynne 05-03-2009 05:40 PM

Is this code you wrote yourself? If not, you can't post it here without permission from the author.

ageurtse 05-03-2009 05:53 PM

i wish i had write this peace of code.
the code is i think from here https://vborg.vbsupport.ru/showthread.php?t=68419

i found this gallery file on the server i currently administrate.

the author i can't reach his website is out of order.

what could i do next to contact him ?

when it is still "illigal" then this thread should be closed and removed :(

Lynne 05-03-2009 05:58 PM

I removed the code from the first post.

It is fine if you want to hire someone to change the code for use on your own site, but since the author didn't give permission for the code to be 'reused' or for you to post it anywhere, then you can't just post the code here. The coder hasn't been here for over eight months, so I'm guessing he isn't going to be checking for PMs here.

ageurtse 05-04-2009 04:43 PM

what is wrong with this peace of code
Code:

        $sorturl = "gallery.php?&userid=$userid&pp=$perpage&showthumbs=$showthumbs";
        $pagenav = construct_page_nav($totalattachments, $sorturl);

$totalattachments is a integer number.
i'm thinking of what arguments are missing.

i get two errors.
Warning: Missing argument 3 for construct_page_nav() in [path]/includes/functions.php on line 2410

Warning: Missing argument 4 for construct_page_nav() in [path]/includes/functions.php on line 2410

Lynne 05-04-2009 05:01 PM

Take a look at the API for construct_page_nav. You need 4 arguments. http://members.vbulletin.com/api/

ageurtse 05-04-2009 05:09 PM

thanks lynne, i bookmarked it.

is the code from 3.7.x the same as 3.8.x ?

--------------- Added [DATE]1241462539[/DATE] at [TIME]1241462539[/TIME] ---------------

what do $show en $post mean, i can't find a manual about these 2 things

Lynne 05-04-2009 06:24 PM

What do they *mean*? They are just variable names. You can name results anything you want. In vbulletin code, $show is in general used as the variable to determine if something should be shown or not, and $post is in general used for post results.

ageurtse 05-04-2009 07:28 PM

When will the code be displayed after construct_page_nav is called.

i think i have rewritten the code i early posted and it run's fine, no errors.
But there are no attachments there is only the page header, navbar and footer.
but inbetween where the attachments should be there is nothing ?

what could be wrong ?

Lynne 05-04-2009 07:55 PM

I have no idea because I don't know anything about the code.

ageurtse 05-06-2009 04:23 PM

i have te script running on 3.8.2 but i left some part's out becaus i don't get them to work.

one of them is this peace of code
PHP Code:

foreach ($vbulletin->userinfo['forumpermissions'] AS $vbulletin->foruminfo[forumid] => $perm)
{
    if ((
$perm CANVIEW))
  {
        
$forumids .= ','.$vbulletin->foruminfo[forumid];
  }


what is wrong, Canview does that exicst ?

Lynne 05-06-2009 05:40 PM

Try doing a search in other vb pages (use a text editor that will search all pages in a folder/directory) for similar code in vb and see what code is used. For instance, I think forumpermissions are usually attached to a forumid now, ie ['forumpermission']['some_forumid'] . So, you'll probably have to play with the code a bit.

edit: OK, I did find a couple of places where that isn't so. Do a search for "$vbulletin->userinfo['forumpermissions']" and you'll find some examples of 3.8 code that is similar to what you have there.


All times are GMT. The time now is 07:04 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
  • Page Generation 0.01190 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete