Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Adding a link back to an adoptable's stats (http://www.mysidiaadoptables.com/forum/showthread.php?t=4203)

Hwona 07-16-2013 08:26 AM

Adding a link back to an adoptable's stats
 
Hello, I was thinking about adding a link back to an adoptable's stats from the "click" page, but I can't figure out how to insert the adoptable's id into the "stat" page url. Can someone help me? :)

Infernette 07-16-2013 11:01 AM

{$this->adopt->aid} is what you need. ^^

Hwona 07-16-2013 11:40 AM

Re
 
Thanks! So I just plug this thing into the link? >^.^<

Infernette 07-16-2013 11:44 AM

Yep! If you want to get anything else on the adopt, replacing aid also works. If you get an error about it being a private thing, tell me and what file you're editing so I can tell you how to remove that (so you don't have to add a column, or you can add one).

>Slow coding day today, all I need to do is fix up the profile page to my likes and add in a slot buying page, which the slots thing is done.<

Hwona 07-16-2013 12:01 PM

Doesn't work - probably because I'm editing the lang levelup file but, is this how it's suppossed to be done?:
<a href="http://caterpillarcave.x10.mx/levelup/stats/{$this->adopt->aid}" target="_self" title="" style="font-size:16;color:black;font-family:;text-decoration:none;">Click here to view this adoptable</a>
The php is smack in the middle of the link. O.o

Hall of Famer 07-16-2013 12:05 PM

Well Id say using the GUI component Link object is the better idea, since you never know where the relative url will resolve to.

Hwona 07-16-2013 12:15 PM

Oh, but what's that? I don't have any experience with PHP, so I'm kind of trying to figure out what that is... >.<

Infernette 07-16-2013 01:43 PM

Quote:

Originally Posted by Wallie987 (Post 27507)
Doesn't work - probably because I'm editing the lang levelup file but, is this how it's suppossed to be done?:
<a href="http://caterpillarcave.x10.mx/levelup/stats/{$this->adopt->aid}" target="_self" title="" style="font-size:16;color:black;font-family:;text-decoration:none;">Click here to view this adoptable</a>
The php is smack in the middle of the link. O.o

Yeah, I normally don't go through the lang file. In the php file it'd work, I have done something similar. I don't use the styles either (would you believe me if I told you I spent 2 hours trying to figure out how to align something?) :coloness:

Hwona 07-16-2013 02:20 PM

Quote:

Originally Posted by Infernette (Post 27510)
Yeah, I normally don't go through the lang file. In the php file it'd work, I have done something similar. I don't use the styles either (would you believe me if I told you I spent 2 hours trying to figure out how to align something?) :coloness:

Well, you have a really amazing site so sorry, but no, I don't believe you. XP

So let me try it in the php file...

Edit: Uh oh - broke the page! :L Erm, what's supposed to go around the link?

I've been trying to put it in like this: $pagelink = <a href="http://caterpillarcave.x10.mx/levelup/stats/{$this->adopt->aid}" target="_self" title="" style="font-size:16;color:black;font-family:;text-decoration:none;">Click here to view this adoptable</a>
$document => addlangvar ($message, $pagelink);

Infernette 07-16-2013 02:47 PM

Quote:

Originally Posted by Wallie987 (Post 27511)
Well, you have a really amazing site so sorry, but no, I don't believe you. XP

So let me try it in the php file...

Edit: Uh oh - broke the page! :L Erm, what's supposed to go around the link?

I've been trying to put it in like this: $pagelink = <a href="http://caterpillarcave.x10.mx/levelup/stats/{$this->adopt->aid}" target="_self" title="" style="font-size:16;color:black;font-family:;text-decoration:none;">Click here to view this adoptable</a>
$document => addlangvar ($message, $pagelink);

It needs to be a regular dash not a equals sign, methinks.


All times are GMT -5. The time now is 06:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.