{mod request} Need ...
 
Notifications
Clear all

{mod request} Need help with LJ code link

10 Posts
3 Users
0 Reactions
3,323 Views
(@chris)
Posts: 77
Trusted Member
Topic starter
 

I may not explain this well...

Most of my stories are from my LiveJournal and and sometimes because of my flist I write. So I tend to write them in as inspiration or evil for making me write it in the first place and I add these people into the story notes. I was wondering if there was a way for an image similar to this : Story Notes Image

Something like the profile link except just for story notes where  maybe you could add a list of people if using in the drop down menu that automatically gets an certain images added next to them with link similar to a lj ink. But it's regular if you write it out like what I did.

Maybe this is a module but I wouldn't know where to start if I tried, hence I'm asking.

TIA :mrgreen:


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 29/10/2007 5:09 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

Hm, if all you want is the image (and not an image link and then text link β€” as is usual with LJ) then you could just use CSS to define a class. Set it as the background and off you go? :3

Or is that not what you want?


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 29/10/2007 6:50 pm
(@chris)
Posts: 77
Trusted Member
Topic starter
 

I wanted it to work similar to an lj link. A specialized link that when posted comes with it own image and text link.


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 31/10/2007 12:35 am
(@chris)
Posts: 77
Trusted Member
Topic starter
 

I have what I think I want but I can't figure out how to implement it properly.

<?php
function ljuser($arg) {
echo("<a href="" http://www.livejournal.com/userinfo.bml?user=$arg"><im g" src="" http://stat.livejournal.com/img/userinfo.gif "" alt="[info]" width="17" height="17" border="0" align="bottom"/></a><a href="" http://www.livejournal.com/users/$arg"><b>$arg</b></a>") ;"
}
function ljcomm($arg) {
echo("<a href="" http://www.livejournal.com/userinfo.bml?user=$arg"><im g" src="" http://stat.livejournal.com/img/community.gif "" alt="[info]" width="17" height="17" border="0" align="bottom"/></a><a href="" http://www.livejournal.com/community/$arg"><b>$arg</b></a>") ;"
}
?>

Which, I assume goes into the header.php then

<?php ljuser("name");?> for a user, or <?php ljcomm("name");?>

add in your php page. It works if I make a custom page but how can I convert this for adding as a link to my story notes? And if I could ask separate one for girls and boys images since I wanted to have my own images and have three (Link for user girls, boys and community) but two will work if that's what I can get.
:mrgreen:


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 31/10/2007 10:37 pm
(@jacynthe)
Posts: 242
Estimable Member
 

so basically you'd need to base the image to use on the gender field set by the user in their profile?


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 01/11/2007 11:01 am
 Elle
(@jenny)
Posts: 594
Honorable Member
 

I'd recommend saving the LJ info files to your own server ... and to distinguish boy from girl:


<?php
function ljuser($arg,$gen) {
echo("<a href="" http://www.livejournal.com/userinfo.bml?user=$arg"><im g" src="" http://stat.livejournal.com/img/userinfo.gif "" alt="[info]" width="17" height="17" border="0" align="bottom"/></a><a href="" http://www.livejournal.com/users/$arg"><b>$arg</b></a>") ;"
}
<?php ljuser("Jenny","female"); ?>

... for example.

Then place $gen for wherever you want it in the code.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 01/11/2007 11:02 am
(@chris)
Posts: 77
Trusted Member
Topic starter
 

Thanks Jenny, but unless I am getting it plain wrong, I think you'll need to talk to me like I'm an idiot because I don't think that's what I meant though it solved another problem in the meantime.  This seems to work in just code but I was hoping that there was a transition on the user and comm links to put into the story notes 😐

I think what this guy on wordpress did here might be a clue. http://wiki.wordpress.org/?pagename=LJMacrofier&PHPSESSID=dee32b52c7df24d2310d91d5

Jacynthe, I'm the only one on this archive, I was using as an example but it seemed similar to what I wanted.

I wanted to create a short link similar to what LJ uses for users and community but a version of it to work  in the story notes, summary, end chapter notes and the like but when I add this link in the chapter notes I wanted the code to say "Oh the person is on Livejournal" and then pull the image and link and post with what I have similar to http://samemmetales.fannish.org/viewstory.php?sid=62 here with the little icon and name in the notes.

Confusing... πŸ™‚


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 01/11/2007 7:23 pm
(@jacynthe)
Posts: 242
Estimable Member
 

So I'm guessing you should get the zip for that hack... upload lj-macrofy.php in your eFiction folder... and inside stories.php, you should include


include_once("lj-macrofy.php");

below


include("includes/storyform.php");

... I suppose.

But no idea where you should add the add_filter... or even if that would work. *scratches head*


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 01/11/2007 8:19 pm
(@chris)
Posts: 77
Trusted Member
Topic starter
 

I could try but that post is over four years old... :mrgreen:


I charge into the light and need only yours to find my way. Archive of One: Sam Emme Tales

 
Posted : 02/11/2007 10:50 am
(@jacynthe)
Posts: 242
Estimable Member
 

yeah I saw that and WordPress is not coded like eFiction so this may not even work...


Jacynthe

Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP:  5.3.3
MySQL: 5.0.91-community

 
Posted : 02/11/2007 10:52 am
Share: