PDA

View Full Version : print_stop_message help


aggiefan
07-01-2007, 11:00 PM
I'm currently coding a custom hack that tracks pledges for different things my site is affiliated with. It all works like a charm, but now I'm working on the ADMINCP side of things.

I'm trying to use the print_stop_message('xxx') command when an option is submitted, but it keeps telling me it can't find the phrase. I've tried every which way to get it to find that phrase and it's not. The phrase is set up in my phrase manager.

What am I missing here that's probably obvious to everybody else?

Dismounted
07-02-2007, 04:52 AM
How are you setting up the phrase in the phrase manager (details)?

aggiefan
07-02-2007, 04:21 PM
Like this... Thoughts? the print stop message then says print_stop_message('pledgetracker_sport_added')

Language MASTER LANGUAGE
Phrase Type GLOBAL
Product Pledge Tracker
Varname pledgetracker_sport_added
Text This sport has been successfully added.

NO TRANSLATIONS

Dismounted
07-03-2007, 05:43 AM
Does anything appear when you just put "$vbphrase['pledgetracker_sport_added']"?

aggiefan
07-03-2007, 11:38 AM
Yeah, it prints the actual message in the top left of the admincp, but it doesn't follow the redirect and it just sits on the message. The message also doesn't look like part of the admincp as it's just black text on the white screen.

However, at least with the print_stop_message it shows up inside a message box and then redirects -- it just says, "Can't find phrase xxx"

EnIgMa1234
07-03-2007, 12:11 PM
Try moving the phrase to error messages instead of Global

Also try this code, not sure if it'll work but its worth a try

print_standard_error('$vbphrase[pledgetracker_sport_added
]')

aggiefan
07-04-2007, 02:10 AM
I'll give it a shot and report in the morning. Thanks!

I got it to work (as an FYI).

For it to print, the phrase has to be a phrase type: "Front-End Error Messages"