It is currently April 27th, 2024, 4:36 pm



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Automatically Prefix for ThemaPoster
PostPosted: December 9th, 2023, 10:57 am 

Joined: March 14th, 2021, 10:29 am
Posts: 33
Hello,
I want my prefix to be automatically recognized and sent to ThemePoster.
How can I create this?
Without me specifying it manually in the ThemeCreator.
The genre is displayed in ThemeCreator when creating the genre.
I have also maintained the prefix Neat in all forums at ThemaPoster.


Top
 Profile  
Reply with quote  
 Post subject: Re: Automatically Prefix for ThemaPoster
PostPosted: December 9th, 2023, 12:09 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12646
Location: Earth
Hi,

depends on your prefix names really.

You can add this line in "Main" template anywhere:
Code:
<prefix>PREFIX_TAG</prefix>


Should be prefix tag name inside (not the title). You can look-up the tag names in themaPoster prefixes table.

For example:
Code:
<prefix>[MULTI]</prefix>


Depends on what genre you mean, just put the genre tag inside and make it's matching in themaPoster as well.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Automatically Prefix for ThemaPoster
PostPosted: December 9th, 2023, 9:59 pm 

Joined: March 14th, 2021, 10:29 am
Posts: 33
What I mean are these.
For example:

This is output in the ThemaCreator.
Genre: Action, Science Fiction, Horror

When posting on the ThemaPoster, it should adopt one of them.
So that when you automatically post to a page the prefix is set.


Top
 Profile  
Reply with quote  
 Post subject: Re: Automatically Prefix for ThemaPoster
PostPosted: December 10th, 2023, 2:21 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12646
Location: Earth
If those are IMDB genres add this line in "Main" themaCreator template:
Code:
<prefix>{#imdbGenres#}</prefix>


Add this replacement to leave only the first genre:

Search for:
Code:
(<prefix>.+?),.+?(</prefix>)


Replace with:
Code:
$1$2


Enable regex search.

Make sure in themaPoster you have prefixes added which names are 100% the same as genres (if you didn't you need rename / add and Sync the prefixes then).

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Automatically Prefix for ThemaPoster
PostPosted: December 10th, 2023, 4:07 pm 

Joined: March 14th, 2021, 10:29 am
Posts: 33
Thanks for your help.
It worked great

How can I adjust the regex so that it takes the second or third genre.
Maybe I'll need that later.


Top
 Profile  
Reply with quote  
 Post subject: Re: Automatically Prefix for ThemaPoster
PostPosted: December 10th, 2023, 7:30 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12646
Location: Earth
Second:

Search for:
Code:
(<prefix>).+?,\s*(.+?),.+?(</prefix>)


Replace with:
Code:
$1$2$3


Enable regex search.

Third:

Search for:
Code:
(<prefix>).+,\s*(.+?)(</prefix>)


Replace with:
Code:
$1$2$3


Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC