collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 556
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Help.....This is driving me crazy!!!  (Read 4649 times)

0 Members and 1 Guest are viewing this topic.

Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Help.....This is driving me crazy!!!
« on: November 01, 2011, 08:42:19 PM »
I've been trying to use this code...

Code: [Select]
<?php ssi_smfg_featuredVehicle(); ?>

as supplied by the mod author @ smfgarage.com using his SSI examples, but when I paste the code into a custom php block I get this error....

Quote
Fatal error: Call to undefined function: ssi_smfg_featuredvehicle() in /home/galxc3/public_html/forum/Sources/PortalBlocks.php(3353) : eval()'d code on line 1

I've tried several different things but to no avail....I found a "dirty" way to display the featured ride using an iframe but I just don't like it.

any ideas? 





 

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: Help.....This is driving me crazy!!!
« Reply #1 on: November 01, 2011, 11:55:41 PM »
Have you tried the bbc and html blocks?

Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Help.....This is driving me crazy!!!
« Reply #2 on: November 02, 2011, 05:43:31 AM »

I don't use that mod to know what the block should exactly contain.

Assuming it only needs to execute that function as you describe, you will need to include the file that contains that function.

Figure out the appropriate file name (my example uses Sources/my_file.php) ...

Code: [Select]
@include_once('Sources/my_file.php');
ssi_smfg_featuredVehicle();

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help.....This is driving me crazy!!!
« Reply #3 on: November 08, 2011, 12:23:53 PM »
TW1ST3D,

* Make sure the function exists in one of the files on your forum
* Make sure the file is included.

The fact that the function call starts with "ssi" makes me think that the garage mod was supposed to add it to SSI.php.  Please check with the mod's manual install page to see if this is true.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Help.....This is driving me crazy!!!
« Reply #4 on: November 08, 2011, 08:28:34 PM »
Thanks for lending a hand Angelinabelle....

The mod installed two.ssi files in my forum root (/forum/ssi_Garage.php and /forum/SSI_Garage_examples.php)

when I open the SSI_Garage_examples.php in my browser, it works fine.....that is, it shows like it is supposed to.

but when I implement the code in a custom .php box, it shows an error.

I've attached the two ssi files, but I doubt there is an issue with them as it displays properly in the "examples".

Any help would be much appreciated!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Help.....This is driving me crazy!!!
« Reply #5 on: November 08, 2011, 11:19:27 PM »

I don't use that mod to know what the block should exactly contain.

Assuming it only needs to execute that function as you describe, you will need to include the file that contains that function.

Figure out the appropriate file name (my example uses Sources/my_file.php) ...

Code: [Select]
@include_once('Sources/my_file.php');
ssi_smfg_featuredVehicle();


Better to use $sourcedir and also to use require_once()

Offline Lord Anubis

  • Newbie
  • Posts: 2
  • SMF Version: 2 RC2
  • SP Version: None
Re: Help.....This is driving me crazy!!!
« Reply #6 on: November 09, 2011, 11:19:38 PM »
have u tried just adding

Code: [Select]
ssi_smfg_featuredVehicle();
in a PHP block without the PHP tags

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help.....This is driving me crazy!!!
« Reply #7 on: November 10, 2011, 03:26:04 PM »
So the new function is probably in ssi_Garage.php (make sure that is spelled correctly, including the case of all the letters)
Code: [Select]
global $boardurl;
include_once($boardurl. '/ssi_Garage.php');
ssi_smfg_featuredVehicle();
-----------
edit: Fixed my typo (I had used $scripturl instead of $boardurl).  Sorry for the confusion.
« Last Edit: November 14, 2011, 09:50:36 AM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Help.....This is driving me crazy!!!
« Reply #8 on: November 10, 2011, 03:46:54 PM »
$scripturl returns index.php, so that would never work. Try $boardurl

Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Help.....This is driving me crazy!!!
« Reply #9 on: November 13, 2011, 09:07:25 AM »
None of these ideas are working either.....................Hmmmmm.................

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Help.....This is driving me crazy!!!
« Reply #10 on: November 13, 2011, 09:12:00 AM »
Try this with a Custom PHP block:

Code: [Select]
<?php

global $boarddir;
require_once(
$boarddir '/SSI_Garage.php');
ssi_smfg_featuredVehicle();

?>

If not, this:

Code: [Select]
<?php

global $boarddir;
require_once(
$boarddir '/ssi_Garage.php');
ssi_smfg_featuredVehicle();

?>
And slowly, you come to realize... It's all as it should be...

Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Help.....This is driving me crazy!!!
« Reply #11 on: November 13, 2011, 05:58:14 PM »
Still a no-go.......this is odd.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Help.....This is driving me crazy!!!
« Reply #12 on: November 13, 2011, 10:07:14 PM »

Actually the mod includes some good instructions for using its functions.
With the mod installed on your site, try this in your browser:  http://galxclub.com/forum/ssi_garage_examples.php


Here is an example:
Code: [Select]
$mode = 1;

global $boarddir, $sourcedir; 
@require_once($boarddir . '/SSI_Garage.php');
@require_once($sourcedir . '/GarageFunctions.php');

if ($mode == 1)
   echo '<div style="font-size:8px;">', ssi_smfg_featuredVehicle('200' ,false, 'echo'), '</div>'; 
else
   echo '<div style="font-size:8px;">', ssi_smfg_newestVehicles(false,'5', 'echo'), '</div>';

When editing your block, put this in your Custom Body Style input: overflow:hidden;



With this example I disabled the title (boolean false) assuming you may use SP's own block titles.
Adjust $mode for the data you prefer to display.. add more functions and adjust the logic as you see fit.
I used a div with a font-size attribute as it will enable you to adjust the display (ie. for side blocks).
text-align attribute not working for the div in this example, if you want it centered use html center tags.



Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Help.....This is driving me crazy!!!
« Reply #13 on: November 14, 2011, 04:04:00 AM »
Still a no-go.......this is odd.

What do you mean by no go? What's the exact result? An error?
And slowly, you come to realize... It's all as it should be...

Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Help.....This is driving me crazy!!!
« Reply #14 on: November 16, 2011, 06:05:04 PM »
I used the above code.......Hit preview and the result (like all the other results) is an empty box (screenshot attached)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Help.....This is driving me crazy!!!
« Reply #15 on: November 16, 2011, 10:28:22 PM »
I used the above code.......Hit preview and the result (like all the other results) is an empty box (screenshot attached)

I'm not sure if you entered the block code correctly because some of it is cut-off at the top in your screenshot.

Simple:
Code: [Select]
global $boarddir, $sourcedir; 
@require_once($boarddir . '/SSI_Garage.php');
@require_once($sourcedir . '/GarageFunctions.php');

echo '<div style="font-size:8px;">', ssi_smfg_featuredVehicle('200',false, 'echo'), '</div>'; 

That should display the featured vehicle.
 
Here are some screenshots of blocks with a latest version of the Garage Mod installed.. I don't have any featured vehicles listed but this will show its display.


Offline TW1ST3D

  • Semi Newbie
  • *
  • Posts: 28
  • Gender: Male
    • The Georgia LX Club
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Help.....This is driving me crazy!!!
« Reply #16 on: November 17, 2011, 02:26:50 PM »
Thanks for the help. Looks like something is broke. I'll uninstall the mod and reinstall tonight......

WOOT !!!   SUCCESS !!!!   There was a problem with my Simpleportal installation. I downloaded the new RC version and it works beautifully!!!

Thanks for all the support, guys!!!
« Last Edit: November 17, 2011, 09:09:26 PM by TW1ST3D »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Help.....This is driving me crazy!!!
« Reply #17 on: November 28, 2011, 03:39:58 PM »
I'm glad the re-install fixed it.  Please be sure to install Simple Portal 2.3.4 now that it is out!
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?