Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Need help, with creating page
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / M-BiTsy / M-BiTsy Support

2020-08-04 11:09:17
[USER=20288]@m-jay[/USER] ,

I am trying to create a page for our so called "not allowed list" which will inform users what content can not be posted (commercial releases).
For this purposes I took the rules page, and duplicated the SQL table from rules to nals.
I have also created a models file and a controller file (both attached).
But when I try to open the file I am only seeing " Oops somwthing went wrong, Admin have been notified if this continues please contact a member of staff. Thank you "

My link is: <a href='<?php echo TTURL; ?>/nal' class="list-group-item"><i class="fa fa-chevron-right"></i> <?php echo T_("SITE_NAL"); ?></a>

From the exception file I note the following >>

[color=rgb(251, 160, 38)]Call Stack

[0] File: /volume1/web/u2sites.xyz/bootstrap.u2site.xyz/index.php Line: 5
Function: Router->__construct
Call parameters[/color]

[color=rgb(255, 255, 255)]I am sure I am missing something, can u push me in the right direction?[/color]
NotAllowedList.zip
Download

If It Ain't Dutch, It Ain't Much!!
2020-08-04 11:19:53
quick look at controller and its called Nals so try added 's'  <?php echo TTURL; ?>/nals' , the files look fine
2020-08-04 11:25:21
"m-jay, post: 68921, member: 20288":

quick look at controller and its called Nals so try added 's'  <?php echo TTURL; ?>/nals' , the files look fine

Ok changed the link to nals. When I click this the index refreshed - but page did not load.
If It Ain't Dutch, It Ain't Much!!
2020-08-04 11:42:00
Is Controller called Nals.php
2020-08-04 11:47:32
"m-jay, post: 68925, member: 20288":

Is Controller called Nals.php


It is now, I renamed it from Nal.php to Nals.php.
Getting HTTP ERROR 500 at this moment.

The models file is still named Nal.php
If It Ain't Dutch, It Ain't Much!!
2020-08-04 15:39:35
it looks like it was model name $this->model('nal'); ive attached files i uploaded and search siteurl/nals you dont need sql

my code is little different if it does not work its because of the object ive added example on Nals.php (controller)
      //if ($row["public"] == "yes")
is now
     if ($row->public == "yes")


anything below $res = $this->nalModel->getnals(); can be swapped for your original files, just checking my current project against github before adding controller changes
the code will become a lot more object orientated when i start adding the classes just trying to comment github better

Been trying to keep code similar for comparing changes on github but its getting to point where i need to format all files getting a little messy now lol

for anyone else who it might benefit sometimes when a object is called  $row["public"] this will throw a error like Cannot use object of type stdClass as array
this just means its expecting the object to be passed better, calling objects by $this-> in classes does this often
$row->public
NotAllowedList.zip
Download
2020-08-04 16:11:24
When using the files from the above zip, no more error but also no page loaded.
I swapped the code lines below $res = $this->nalModel->getnals();  and all working ok.
Let me try and learn from this one. Going to have to add a couple more pages maybe in the future.

Thanks for jumping on this one! Again much appreciated.
If It Ain't Dutch, It Ain't Much!!
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728