Jump to content
TNG Community
Hans Uwe Petersen

Surname Cloud and WordPress page

Recommended Posts

Hans Uwe Petersen

I use the Klostermann way to integrate my WordPress and tng installation. 

I know how to show the Surname Cloud anywhere within tng with this code snippet:
<div>
    <?php
        include($cms['tngpath'] . "surname_cloud.class.php");
        $nc = new surname_cloud();
        $nc->display(100);
    ?>
</div>

I would like to add the Surname Cloud to the WordPress page, which is my entrance-page for tng. Have a look at the attached screenprint.

Any hint to modify the above include-statement so I have the correct call from the WordPress page would be helpful.
Thanks.

wp-surname-cloud.jpg

Share this post


Link to post
Share on other sites
fluffy82

I use the widget that's available here. It works wonderfully well on my homepage :)

Share this post


Link to post
Share on other sites
Hans Uwe Petersen

Thank you for your answer.

Your link to the widget is not working.

It looks like nothing was found at this location."

Share this post


Link to post
Share on other sites
stores

Yep, link does not work.

Share this post


Link to post
Share on other sites
Hans Uwe Petersen

It is not a question regarding the browser. Even when you right-click on the link to save the content, you'll get to empty zip files.

Share this post


Link to post
Share on other sites
fluffy82
1 hour ago, Hans Uwe Petersen said:

Thank you for your answer.

Your link to the widget is not working.

It looks like nothing was found at this location."

Oh, I didn't realize that. I've been using it for years and never had to re-download it.

I think the website was made by @HeatherFeuer, maybe she can provide the zip files again?

Share this post


Link to post
Share on other sites
mahesh

I use a modified surnames-top-10 file in my home page (Top 10 Surnames for TNG written by Walter Schulze 2004). It's not a widget or shortcode. Happy to share. http://www.upavadi.net/

 

Share this post


Link to post
Share on other sites
Hans Uwe Petersen

Thanks for this input. But your solution is not, what I'm looking for. Your surnames-top-10 list is placed on the index.php page, which belongs to the tng-installation. My intention is to show the surnames-top-x list on a page belonging to WordPress.

But by looking at the source code of your index.php page I got an idea to make a table in the same way.

Share this post


Link to post
Share on other sites
mahesh
13 minutes ago, Hans Uwe Petersen said:

 Your surnames-top-10 list is placed on the index.php page, which belongs to the tng-installation.

Actually, it is in the Worpress Welcome page with TNG data imported.. I use a PHP file as a template in a Wordpress page.

Anyway, I am glad it has inspired you.

Share this post


Link to post
Share on other sites
Hans Uwe Petersen

Hi again.

I have now added a table with the 15 most uses surnames on my WordPress page. Thanks again for your input. But I would like to have a look at your PHP-files, which is used as a template in the WordPress page. Would that be possible?

alternative-surname-list-in-wordpress.jpg

Share this post


Link to post
Share on other sites
mahesh
29 minutes ago, Hans Uwe Petersen said:

Hi again.

 But I would like to have a look at your PHP-files, which is used as a template in the WordPress page. Would that be possible?

Hi Hanse,

Surname block looks good. I create a template file in the current theme. Then include various PHP add-ons in the template file. I attach modified top 10 surname file. Did you a want see the the actual template file?

surnames-top10B.php

Share this post


Link to post
Share on other sites
Hans Uwe Petersen

Hi Mahesh

Thank you so much for the file. I will give it a try.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×